Interface RequestEventMatcher

Rule that controls which request matches, and to which Telegram chat the text should be sent.

The rule predicate determines whether a request matches or not.

The rule text converts the combination request and event into a text to send to Telegram. This text should respect the formatting options and length allowed by the sendMessage endpoint of the Telegram API.

See

Hierarchy

  • RequestEventMatcher

Properties

name: string
predicate: ((request: Request, event: RequestEvent, tags: Tags) => boolean)

Type declaration

    • (request: Request, event: RequestEvent, tags: Tags): boolean
    • Parameters

      • request: Request
      • event: RequestEvent
      • tags: Tags

      Returns boolean

text: ((request: Request, event: RequestEvent, tags: Tags) => string)

Type declaration

    • (request: Request, event: RequestEvent, tags: Tags): string
    • Parameters

      • request: Request
      • event: RequestEvent
      • tags: Tags

      Returns string

token: string

Generated using TypeDoc