Class AbstractTelegramBot
java.lang.Object
com.github.unafraid.telegrambot.bots.AbstractTelegramBot
- All Implemented Interfaces:
org.telegram.telegrambots.longpolling.interfaces.LongPollingUpdateConsumer,org.telegram.telegrambots.meta.generics.TelegramClient
- Direct Known Subclasses:
DefaultTelegramBot
public class AbstractTelegramBot
extends Object
implements org.telegram.telegrambots.longpolling.interfaces.LongPollingUpdateConsumer, org.telegram.telegrambots.meta.generics.TelegramClient
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTelegramBot(org.telegram.telegrambots.meta.generics.TelegramClient telegramClient) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHandler(ITelegramHandler handler) Registers ICommandHandler instance into a collection of handlersvoiddownloadFile(org.telegram.telegrambots.meta.api.objects.File file) downloadFileAsStream(org.telegram.telegrambots.meta.api.objects.File file) downloadFileAsStreamAsync(org.telegram.telegrambots.meta.api.objects.File file) downloadFileAsync(org.telegram.telegrambots.meta.api.objects.File file) <T extends Serializable,Method extends org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<T>>
Texecute(Method method) execute(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendAnimation sendAnimation) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendAudio sendAudio) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendDocument sendDocument) List<org.telegram.telegrambots.meta.api.objects.message.Message>execute(org.telegram.telegrambots.meta.api.methods.send.SendMediaGroup sendMediaGroup) List<org.telegram.telegrambots.meta.api.objects.message.Message>execute(org.telegram.telegrambots.meta.api.methods.send.SendPaidMedia sendPaidMedia) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendPhoto sendPhoto) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendSticker sendSticker) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendVideo sendVideo) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendVideoNote sendVideoNote) org.telegram.telegrambots.meta.api.objects.message.Messageexecute(org.telegram.telegrambots.meta.api.methods.send.SendVoice sendVoice) execute(org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet addStickerToSet) execute(org.telegram.telegrambots.meta.api.methods.stickers.CreateNewStickerSet createNewStickerSet) execute(org.telegram.telegrambots.meta.api.methods.stickers.ReplaceStickerInSet replaceStickerInSet) execute(org.telegram.telegrambots.meta.api.methods.stickers.SetStickerSetThumbnail setStickerSetThumbnail) org.telegram.telegrambots.meta.api.objects.Fileexecute(org.telegram.telegrambots.meta.api.methods.stickers.UploadStickerFile uploadStickerFile) execute(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) execute(org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia editMessageMedia) <T extends Serializable,Method extends org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<T>>
CompletableFuture<T>executeAsync(Method method) executeAsync(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendAnimation sendAnimation) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendAudio sendAudio) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendDocument sendDocument) CompletableFuture<List<org.telegram.telegrambots.meta.api.objects.message.Message>>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendMediaGroup sendMediaGroup) CompletableFuture<List<org.telegram.telegrambots.meta.api.objects.message.Message>>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendPaidMedia sendPaidMedia) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendPhoto sendPhoto) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendSticker sendSticker) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVideo sendVideo) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVideoNote sendVideoNote) CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message>executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVoice sendVoice) executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet addStickerToSet) executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.CreateNewStickerSet createNewStickerSet) executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.ReplaceStickerInSet replaceStickerInSet) executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.SetStickerSetThumbnail setStickerSetThumbnail) CompletableFuture<org.telegram.telegrambots.meta.api.objects.File>executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.UploadStickerFile uploadStickerFile) executeAsync(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) executeAsync(org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia editMessageMedia) <T extends ITelegramHandler>
List<T>getAvailableHandlers(Class<T> clazz) Returns aList<T>and verifies for access level if any of the handlers implementsITelegramHandler<T extends ITelegramHandler>
List<T>getAvailableHandlersForUser(Class<T> clazz, org.telegram.telegrambots.meta.api.objects.User user) Returns aList<T>and verifies for access level if any of the handlers implementsITelegramHandlergetHandler(String command) protected StringprocessText(String text) booleanremoveHandler(ITelegramHandler handler) Removes ICommandHandler instance from the collection of handlersvoidsetAccessLevelValidator(IAccessLevelValidator accessLevelValidator) Sets the Access Level Validator instance that will be used for future access level validations<T extends ITelegramHandler>
booleanvalidateAccessLevel(T handler, org.telegram.telegrambots.meta.api.objects.User user) Validates access levelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.telegram.telegrambots.meta.generics.TelegramClient
downloadFile, downloadFileAsStream, downloadFileAsStreamAsync, downloadFileAsync
-
Constructor Details
-
AbstractTelegramBot
public AbstractTelegramBot(org.telegram.telegrambots.meta.generics.TelegramClient telegramClient)
-
-
Method Details
-
consume
- Specified by:
consumein interfaceorg.telegram.telegrambots.longpolling.interfaces.LongPollingUpdateConsumer
-
processText
- Parameters:
text- the message's text- Returns:
- Text without @BotNickname if specified
-
setAccessLevelValidator
Sets the Access Level Validator instance that will be used for future access level validations- Parameters:
accessLevelValidator- the access level validator implementation
-
getAccessLevelValidator
- Returns:
- the Access Level Validator instance that will be used for future access level validations
-
addHandler
Registers ICommandHandler instance into a collection of handlers- Parameters:
handler- the ICommandHandler instance
-
removeHandler
Removes ICommandHandler instance from the collection of handlers- Parameters:
handler- the ICommandHandler instance- Returns:
trueif handler with such command name was previously registered,falseotherwise
-
getHandler
- Parameters:
command- the command name- Returns:
ICommandHandlercommand handler from the collection of handlers,nullif not registered
-
getHandlers
- Returns:
Collection<ICommandHandler>the collection of ICommandHandler containing all currently registered handlers
-
getAvailableHandlers
Returns aList<T>and verifies for access level if any of the handlers implementsITelegramHandler- Type Parameters:
T- the type of the handler- Parameters:
clazz- the class of the handler- Returns:
List<T>with all handlers implementing the generic type provided
-
getAvailableHandlersForUser
public <T extends ITelegramHandler> List<T> getAvailableHandlersForUser(Class<T> clazz, org.telegram.telegrambots.meta.api.objects.User user) Returns aList<T>and verifies for access level if any of the handlers implementsITelegramHandler- Type Parameters:
T- the type of the handler- Parameters:
clazz- the class of the handleruser- the user that requests this handler- Returns:
List<T>with all handlers implementing the generic type provided
-
validateAccessLevel
public <T extends ITelegramHandler> boolean validateAccessLevel(T handler, org.telegram.telegrambots.meta.api.objects.User user) Validates access level- Type Parameters:
T- the type- Parameters:
handler- the handleruser- the user requesting the that handler- Returns:
trueif user is able to use that handler,falseotherwise (Not registered, doesn't have access and so)
-
executeAsync
public <T extends Serializable,Method extends org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<T>> CompletableFuture<T> executeAsync(Method method) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public <T extends Serializable,Method extends org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<T>> T execute(Method method) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendDocument sendDocument) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendPhoto sendPhoto) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendVideo sendVideo) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendVideoNote sendVideoNote) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendSticker sendSticker) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendAudio sendAudio) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendVoice sendVoice) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public List<org.telegram.telegrambots.meta.api.objects.message.Message> execute(org.telegram.telegrambots.meta.api.methods.send.SendMediaGroup sendMediaGroup) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public List<org.telegram.telegrambots.meta.api.objects.message.Message> execute(org.telegram.telegrambots.meta.api.methods.send.SendPaidMedia sendPaidMedia) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet addStickerToSet) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.stickers.ReplaceStickerInSet replaceStickerInSet) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.stickers.SetStickerSetThumbnail setStickerSetThumbnail) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Boolean execute(org.telegram.telegrambots.meta.api.methods.stickers.CreateNewStickerSet createNewStickerSet) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.File execute(org.telegram.telegrambots.meta.api.methods.stickers.UploadStickerFile uploadStickerFile) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public Serializable execute(org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia editMessageMedia) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
downloadFile
public File downloadFile(org.telegram.telegrambots.meta.api.objects.File file) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
downloadFilein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
downloadFileAsStream
public InputStream downloadFileAsStream(org.telegram.telegrambots.meta.api.objects.File file) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
downloadFileAsStreamin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
execute
public org.telegram.telegrambots.meta.api.objects.message.Message execute(org.telegram.telegrambots.meta.api.methods.send.SendAnimation sendAnimation) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
executein interfaceorg.telegram.telegrambots.meta.generics.TelegramClient- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendDocument sendDocument) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendPhoto sendPhoto) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVideo sendVideo) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVideoNote sendVideoNote) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendSticker sendSticker) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendAudio sendAudio) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendVoice sendVoice) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<List<org.telegram.telegrambots.meta.api.objects.message.Message>> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendMediaGroup sendMediaGroup) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<List<org.telegram.telegrambots.meta.api.objects.message.Message>> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendPaidMedia sendPaidMedia) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet addStickerToSet) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.ReplaceStickerInSet replaceStickerInSet) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.SetStickerSetThumbnail setStickerSetThumbnail) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.CreateNewStickerSet createNewStickerSet) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.File> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.UploadStickerFile uploadStickerFile) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<Serializable> executeAsync(org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia editMessageMedia) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
executeAsync
public CompletableFuture<org.telegram.telegrambots.meta.api.objects.message.Message> executeAsync(org.telegram.telegrambots.meta.api.methods.send.SendAnimation sendAnimation) - Specified by:
executeAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
downloadFileAsync
public CompletableFuture<File> downloadFileAsync(org.telegram.telegrambots.meta.api.objects.File file) - Specified by:
downloadFileAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-
downloadFileAsStreamAsync
public CompletableFuture<InputStream> downloadFileAsStreamAsync(org.telegram.telegrambots.meta.api.objects.File file) - Specified by:
downloadFileAsStreamAsyncin interfaceorg.telegram.telegrambots.meta.generics.TelegramClient
-