Annotation Interface BotCommand


@Target(METHOD) @Retention(RUNTIME) @Documented public @interface BotCommand
Maps a handler method to one or more Telegram bot commands. The annotated method is invoked when an incoming message contains a command (e.g., /start) that matches any of the specified values. An empty value array matches all commands not handled by a more specific mapping.
Since:
0.0.1
Author:
Islom Mirsaburov
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The bot command strings (e.g., "/start", "/help") that trigger this handler.
  • Element Details

    • value

      String[] value
      The bot command strings (e.g., "/start", "/help") that trigger this handler.
      Returns:
      an array of command strings to match against incoming messages
      Default:
      {}