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

    Constructors
    Constructor
    Description
    AbstractTelegramBot(org.telegram.telegrambots.meta.generics.TelegramClient telegramClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers ICommandHandler instance into a collection of handlers
    void
    consume(List<org.telegram.telegrambots.meta.api.objects.Update> updates)
     
    downloadFile(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>>
    T
    execute(Method method)
     
    execute(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendAnimation sendAnimation)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendAudio sendAudio)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(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.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendPhoto sendPhoto)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendSticker sendSticker)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendVideo sendVideo)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(org.telegram.telegrambots.meta.api.methods.send.SendVideoNote sendVideoNote)
     
    org.telegram.telegrambots.meta.api.objects.message.Message
    execute(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.File
    execute(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>
    Returns a List<T> and verifies for access level if any of the handlers implements ITelegramHandler
    <T extends ITelegramHandler>
    List<T>
    getAvailableHandlersForUser(Class<T> clazz, org.telegram.telegrambots.meta.api.objects.User user)
    Returns a List<T> and verifies for access level if any of the handlers implements ITelegramHandler
    getHandler(String command)
     
     
    protected String
     
    boolean
    Removes ICommandHandler instance from the collection of handlers
    void
    Sets the Access Level Validator instance that will be used for future access level validations
    <T extends ITelegramHandler>
    boolean
    validateAccessLevel(T handler, org.telegram.telegrambots.meta.api.objects.User user)
    Validates access level

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public void consume(List<org.telegram.telegrambots.meta.api.objects.Update> updates)
      Specified by:
      consume in interface org.telegram.telegrambots.longpolling.interfaces.LongPollingUpdateConsumer
    • processText

      protected String processText(String text)
      Parameters:
      text - the message's text
      Returns:
      Text without @BotNickname if specified
    • setAccessLevelValidator

      public void setAccessLevelValidator(IAccessLevelValidator accessLevelValidator)
      Sets the Access Level Validator instance that will be used for future access level validations
      Parameters:
      accessLevelValidator - the access level validator implementation
    • getAccessLevelValidator

      public IAccessLevelValidator getAccessLevelValidator()
      Returns:
      the Access Level Validator instance that will be used for future access level validations
    • addHandler

      public void addHandler(ITelegramHandler handler)
      Registers ICommandHandler instance into a collection of handlers
      Parameters:
      handler - the ICommandHandler instance
    • removeHandler

      public boolean removeHandler(ITelegramHandler handler)
      Removes ICommandHandler instance from the collection of handlers
      Parameters:
      handler - the ICommandHandler instance
      Returns:
      true if handler with such command name was previously registered, false otherwise
    • getHandler

      public ICommandHandler getHandler(String command)
      Parameters:
      command - the command name
      Returns:
      ICommandHandler command handler from the collection of handlers, null if not registered
    • getHandlers

      public Collection<ITelegramHandler> getHandlers()
      Returns:
      Collection<ICommandHandler> the collection of ICommandHandler containing all currently registered handlers
    • getAvailableHandlers

      public <T extends ITelegramHandler> List<T> getAvailableHandlers(Class<T> clazz)
      Returns a List<T> and verifies for access level if any of the handlers implements ITelegramHandler
      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 a List<T> and verifies for access level if any of the handlers implements ITelegramHandler
      Type Parameters:
      T - the type of the handler
      Parameters:
      clazz - the class of the handler
      user - 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 handler
      user - the user requesting the that handler
      Returns:
      true if user is able to use that handler, false otherwise (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:
      executeAsync in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      execute in interface org.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:
      downloadFile in interface org.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:
      downloadFileAsStream in interface org.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:
      execute in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook)
      Specified by:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.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:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.groupadministration.SetChatPhoto setChatPhoto)
      Specified by:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet addStickerToSet)
      Specified by:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.ReplaceStickerInSet replaceStickerInSet)
      Specified by:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.SetStickerSetThumbnail setStickerSetThumbnail)
      Specified by:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Boolean> executeAsync(org.telegram.telegrambots.meta.api.methods.stickers.CreateNewStickerSet createNewStickerSet)
      Specified by:
      executeAsync in interface org.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:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • executeAsync

      public CompletableFuture<Serializable> executeAsync(org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia editMessageMedia)
      Specified by:
      executeAsync in interface org.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:
      executeAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • downloadFileAsync

      public CompletableFuture<File> downloadFileAsync(org.telegram.telegrambots.meta.api.objects.File file)
      Specified by:
      downloadFileAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient
    • downloadFileAsStreamAsync

      public CompletableFuture<InputStream> downloadFileAsStreamAsync(org.telegram.telegrambots.meta.api.objects.File file)
      Specified by:
      downloadFileAsStreamAsync in interface org.telegram.telegrambots.meta.generics.TelegramClient