Annotation Interface ReactionCountHandler


@Retention(RUNTIME) @Target(METHOD) @Repeatable(ReactionCountHandlers.class) public @interface ReactionCountHandler
Annotation for handling reaction count update events in a declarative manner. Designed specifically for handling events when message reaction counts change, providing real-time monitoring of user engagement and interaction patterns. This annotation enables structured handling of reaction updates with custom filtering capabilities for processing reaction count changes and tracking message popularity and user engagement metrics.

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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends CustomFilter>
    Custom filter class for advanced filtering of reaction count update events.
    int
    Priority order for handler registration and execution.
  • Element Details

    • filter

      Class<? extends CustomFilter> filter
      Custom filter class for advanced filtering of reaction count update events. Use this to implement custom logic for determining which reaction updates should trigger this handler, such as filtering by reaction type, count thresholds, message content, user demographics, or engagement level criteria.
      Returns:
      class implementing CustomFilter interface
      Default:
      io.github.natanimn.telebof.filters.DefaultCustomFilter.class
    • priority

      int priority
      Priority 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