Skip to content

Router and filters

router

Filter

Predicate over an event, combinable with &, | and ~.

TextFilter

Bases: Filter

Matches events that carry text, optionally constrained by substring or prefix.

F

Ready-made filters, in the style of a bot framework's F namespace.

Router

Router()

Event handlers with optional filters, dispatched in registration order.

dispatch async

dispatch(event: AnyEvent) -> int

Call every matching handler; returns how many ran.