Class CommandLongPollingTelegramBot

Object
CommandLongPollingTelegramBot
All Implemented Interfaces:
CommandBot, ICommandRegistry, LongPollingUpdateConsumer, LongPollingSingleThreadUpdateConsumer

public abstract class CommandLongPollingTelegramBot extends Object implements CommandBot, ICommandRegistry, LongPollingSingleThreadUpdateConsumer
This class adds command functionality to the TelegramLongPollingBot
Author:
Timo Schulz (Mit0x2)
  • Field Details

    • telegramClient

      protected final TelegramClient telegramClient
  • Constructor Details

    • CommandLongPollingTelegramBot

      public CommandLongPollingTelegramBot(TelegramClient telegramClient, boolean allowCommandsWithUsername, Supplier<String> botUsernameSupplier)
      Creates a Bot for Long Polling Use ICommandRegistry's methods on this bot to register commands
      Parameters:
      telegramClient - Telegram client used to send requests
      allowCommandsWithUsername - true to allow commands with parameters (default), false otherwise
      botUsernameSupplier - Bot username supplier
  • Method Details