Annotation Interface EditedBusinessMessageHandler


@Retention(RUNTIME) @Target(METHOD) @Repeatable(EditedBusinessMessageHandlers.class) public @interface EditedBusinessMessageHandler
Annotation for handling edited business message events in a declarative manner. Designed specifically for handling events when a business message is edited, typically in the context of Telegram Business accounts and their conversations. Provides comprehensive filtering options similar to MessageHandler but specifically for edited messages in business contexts.

Equivalent with using BotClient.onEditedBusinessMessage(FilterExecutor, UpdateHandler)
Since:
1.2.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the chat types where this edited business message handler should be active.
    Specifies the bot commands to match in edited business messages.
    Class<? extends CustomFilter>
    Custom filter class for advanced filtering of edited business message events.
    int
    Priority order for handler registration and execution.
    Regular expression pattern to match against edited business message text content.
    Conversation state required for this edited business message handler to trigger.
    Specifies exact text content to match in the edited business message.
    Specifies the message types to match in edited business messages.
  • Element Details

    • commands

      String[] commands
      Specifies the bot commands to match in edited business messages. Multiple commands are combined using OR logic - the handler will trigger if the edited message contains any of the specified commands.
      Returns:
      array of command strings to match
      Default:
      {}
    • texts

      String[] texts
      Specifies exact text content to match in the edited business message. Multiple texts are combined using OR logic - the handler will trigger if the edited message text exactly matches any of the specified strings.
      Returns:
      array of exact text strings to match
      Default:
      {}
    • chatType

      ChatType[] chatType
      Specifies the chat types where this edited business message handler should be active. Multiple chat types are combined using OR logic - the handler will trigger if the chat type matches any of the specified types.
      Returns:
      array of ChatType enum values to filter by
      Default:
      {}
    • regex

      String regex
      Regular expression pattern to match against edited business message text content. The handler will trigger if the edited message text matches the specified regex pattern.
      Returns:
      regex pattern string for message text matching
      Default:
      ""
    • type

      MessageType[] type
      Specifies the message types to match in edited business messages. Multiple message types are combined using OR logic - the handler will trigger if the edited message type matches any of the specified types.
      Returns:
      array of MessageType enum values to filter by
      Default:
      {}
    • filter

      Class<? extends CustomFilter> filter
      Custom filter class for advanced filtering of edited business message events. Use this to implement custom logic for determining which message edits should trigger this handler, such as filtering by business account type, edit history, compliance requirements, or other business-specific criteria.
      Returns:
      class implementing CustomFilter interface
      Default:
      io.github.natanimn.telebof.filters.DefaultCustomFilter.class
    • state

      String state
      Conversation state required for this edited business message handler to trigger. The handler will only be invoked if the current conversation state matches the specified state value.
      Returns:
      required conversation state string
      Default:
      ""
    • priority

      int priority
      Priority order for handler registration and execution. Handlers with lower priority numbers are registered and executed before those with higher numbers. This allows controlling the order of handler processing when multiple handlers could match the same edited message event.
      Returns:
      priority integer value (lower = earlier execution)
      Default:
      0