API Reference ExGram FSM v#0.1.0

Copy Markdown View Source

Modules

Finite State Machine / conversation state management for ExGram Telegram bots.

An ExGram.Router.Filter that matches on the current active FSM flow name.

An ExGram.Router.Filter that matches when any FSM flow is active.

An ExGram.Router.Filter that matches on the current FSM state or FSM data.

Behaviour and DSL for declaring a named FSM conversation flow.

Runtime helper functions for FSM flow and state management.

Behaviour for extracting FSM storage keys from Telegram updates.

FSM key: {chat_id}.

FSM key: {chat_id, thread_id}.

FSM key: {chat_id, thread_id, user_id}.

Default FSM key: {chat_id, user_id}.

FSM key: {user_id}.

ExGram middleware that loads FSM state before every handler call.

Struct representing a user's FSM flow, state, and associated data.

Behaviour for declaring FSM states and allowed transitions.

Behaviour for FSM state storage backends.

Default in-memory FSM storage using ETS.

ExGram.BotInit hook that initialises the FSM storage backend at bot startup.

Exception raised when an invalid FSM transition is attempted and the on_invalid_transition policy is :raise (the default).