Annotation Interface BusinessMessageHandler
@Retention(RUNTIME)
@Target(METHOD)
@Repeatable(BusinessMessageHandlers.class)
public @interface BusinessMessageHandler
Annotation for handling business message events in a declarative manner.
 Designed specifically for handling messages within Telegram Business accounts,
 providing comprehensive filtering options for commands, text content, chat types,
 regular expressions, message types, conversation states, and custom business logic.
 This annotation enables structured handling of business communications with
 the same comprehensive filtering capabilities as MessageHandler but specifically
 tailored for business account contexts and professional communication needs.
 Equivalent with using 
BotClient.onBusinessMessage(FilterExecutor, UpdateHandler)- Since:
- 1.2.0
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionChatType[]Specifies the chat types where this business message handler should be active.String[]Specifies the bot commands to match in business messages.Class<? extends CustomFilter> Custom filter class for advanced filtering of business message events.intPriority order for handler registration and execution.Regular expression pattern to match against business message text content.Conversation state required for this business message handler to trigger.String[]Specifies exact text content to match in business messages.Specifies the message types to match in business messages.
- 
Element Details- 
commandsString[] commandsSpecifies the bot commands to match in business messages. Multiple commands are combined using OR logic - the handler will trigger if the business message contains any of the specified commands.- Returns:
- array of command strings to match
 - Default:
- {}
 
- 
textsString[] textsSpecifies exact text content to match in business messages. Multiple texts are combined using OR logic - the handler will trigger if the business message text exactly matches any of the specified strings.- Returns:
- array of exact text strings to match
 - Default:
- {}
 
- 
chatType
- 
regexString regexRegular expression pattern to match against business message text content. The handler will trigger if the business message text matches the specified regex pattern.- Returns:
- regex pattern string for message text matching
 - Default:
- ""
 
- 
typeMessageType[] typeSpecifies the message types to match in business messages. Multiple message types are combined using OR logic - the handler will trigger if the business message type matches any of the specified types.- Returns:
- array of MessageTypeenum values to filter by
 - Default:
- {}
 
- 
filterClass<? extends CustomFilter> filterCustom filter class for advanced filtering of business message events. Use this to implement custom logic for determining which business messages should trigger this handler, such as filtering by business account type, customer tiers, service categories, or other business-specific criteria.- Returns:
- class implementing CustomFilterinterface
 - Default:
- io.github.natanimn.telebof.filters.DefaultCustomFilter.class
 
- 
stateString stateConversation state required for this 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:
- ""
 
- 
priorityint priorityPriority order for handler registration and execution. Handlers with lower priority numbers are registered and executed before those with higher numbers.- Returns:
- priority integer value (lower = earlier execution)
 - Default:
- 0
 
 
-