Class AbilityBot

  • All Implemented Interfaces:
    AbilityExtension, org.telegram.telegrambots.meta.generics.LongPollingBot, org.telegram.telegrambots.meta.generics.TelegramBot

    public abstract class AbilityBot
    extends BaseAbilityBot
    implements org.telegram.telegrambots.meta.generics.LongPollingBot
    The default AbilityBot class implements LongPollingBot. It delegates all updates to a DefaultAbsSender instance.
    Author:
    Abbas Abou Daya
    • Method Detail

      • onUpdateReceived

        public void onUpdateReceived​(org.telegram.telegrambots.meta.api.objects.Update update)
        Description copied from class: BaseAbilityBot
        This method contains the stream of actions that are applied on any update.

        It will correctly handle addition of users into the DB and the execution of abilities and replies.

        Specified by:
        onUpdateReceived in interface org.telegram.telegrambots.meta.generics.LongPollingBot
        Overrides:
        onUpdateReceived in class BaseAbilityBot
        Parameters:
        update - the update received by Telegram's API
      • clearWebhook

        public void clearWebhook()
                          throws org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException
        Specified by:
        clearWebhook in interface org.telegram.telegrambots.meta.generics.LongPollingBot
        Throws:
        org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException