Annotation Interface PurchasedPaidMediaHandler


@Retention(RUNTIME) @Target(METHOD) @Repeatable(PurchasedPaidMediaHandlers.class) public @interface PurchasedPaidMediaHandler
Annotation for handling purchased paid media events in a declarative manner. Designed specifically for handling events when users purchase paid media content, providing processing capabilities for completed media transactions and content delivery. This annotation enables structured handling of paid media purchases with filtering options for payload content and custom logic for processing media purchase completions and content access provisioning.

Equivalent with using BotClient.onPurchasedPaidMedia(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 purchased paid media events.
    Specifies the media purchase payload identifiers to match.
    int
    Priority order for handler registration and execution.
  • Element Details

    • payload

      String[] payload
      Specifies the media purchase payload identifiers to match. Multiple payload values are combined using OR logic - the handler will trigger if the purchase payload matches any of the specified identifiers.
      Returns:
      array of payload identifier strings to match
      Default:
      {}
    • filter

      Class<? extends CustomFilter> filter
      Custom filter class for advanced filtering of purchased paid media events. Use this to implement custom logic for determining which media purchases should trigger this handler, such as filtering by media type, purchase amount, content category, user access levels, or other business-specific 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