API Reference ex_gram_router v#0.1.0

Copy Markdown View Source

Modules

A declarative routing DSL for ExGram bots.

@before_compile hook that generates the handle/2 function from the routing tree built by the DSL macros.

Runtime component responsible for walking the routing tree and dispatching updates to the appropriate handler.

Compile-time DSL macros for building the routing tree.

Behaviour for ExGram.Router filters.

Filter that matches message updates containing an animation (GIF or H.264/MPEG-4 AVC).

Filter that matches message updates containing an audio file.

Built-in filter that matches callback query updates (inline keyboard button presses).

Built-in filter that matches Telegram command updates.

Filter that matches message updates containing a shared contact.

Filter that matches message updates containing a document (file).

Built-in filter that matches inline query updates.

Built-in filter that matches location message updates.

Built-in filter that matches generic message updates (photos, documents, stickers, audio, video, etc. — any message that is not text or a command).

Filter that matches message updates containing one or more photos.

Filter that matches message updates containing a poll.

Built-in filter that matches text messages against a compiled regex.

Filter that matches message updates containing a sticker.

Built-in filter that matches plain text message updates.

Filter that matches message updates containing a video file.

Filter that matches message updates containing a video note (round video).

Filter that matches message updates containing a voice message.

Internal data structure representing a node in the routing tree.

Mix Tasks

Prints a flat, one-line-per-handler listing of all routes in an ExGram.Router bot module. Unlike the tree view, every entry is a leaf with its full accumulated filter chain (parent scope filters are prepended).

Prints the routing tree of an ExGram.Router bot module in a human-readable indented tree format.