Class TelegramWebhookCommandBot

Object
DefaultTelegramWebhookBot
TelegramWebhookCommandBot
All Implemented Interfaces:
CommandBot, ICommandRegistry, TelegramWebhookBot

public abstract class TelegramWebhookCommandBot extends DefaultTelegramWebhookBot implements CommandBot, ICommandRegistry
This class adds command functionality to the TelegramWebhookBot
Author:
Andrey Korsakov (loolzaaa)
  • Constructor Details

    • TelegramWebhookCommandBot

      public TelegramWebhookCommandBot(TelegramClient telegramClient, boolean allowCommandsWithUsername, Supplier<String> botUsernameSupplier, String botPath, Runnable setWebhook, Runnable deleteWebhook)
      Creates a TelegramWebhookCommandBot 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
      botPath - Bot Path for the webhook
      setWebhook - Set webhook method execution
      deleteWebhook - Delete webhook method execution
  • Method Details