All Implemented Interfaces:
AbilityExtension, LongPollingUpdateConsumer, LongPollingSingleThreadUpdateConsumer

public abstract class AbilityBot extends BaseAbilityBot
The default AbilityBot class implements LongPollingSingleThreadUpdateConsumer. It delegates all updates to a TelegramClient instance.
Author:
Abbas Abou Daya
  • Constructor Details

    • AbilityBot

      protected AbilityBot(TelegramClient telegramClient, String botUsername, DBContext db, AbilityToggle toggle)
    • AbilityBot

      protected AbilityBot(TelegramClient telegramClient, String botUsername, AbilityToggle toggle)
    • AbilityBot

      protected AbilityBot(TelegramClient telegramClient, String botUsername, DBContext db)
    • AbilityBot

      protected AbilityBot(TelegramClient telegramClient, String botUsername)
  • Method Details

    • consume

      public void consume(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:
      consume in interface LongPollingSingleThreadUpdateConsumer
      Overrides:
      consume in class BaseAbilityBot
      Parameters:
      update - the update received by Telegram's API