Skip to content

Context & FSM API

shirdal.engine.context.Context

Ergonomic, context-first wrapper around an incoming or sent MessageEvent.

ask(prompt=None, *, timeout=60.0, filters=None, parse_mode='html', **reply_kwargs) async

Send an optional prompt and await the next matching reply from this user in this chat.

reply_ephemeral(text, *, receiver_user_id=None, replace=False, parse_mode='html', reply_markup=None) async

Send an ephemeral reply visible only to the triggering user (Bot API 10.2+).

stream(*, draft_id=None, parse_mode='html', can_stop=False, keep_on_stop=False, min_interval=0.25, finalize=True)

Stream partial replies live using Bot API sendMessageDraft.

set_member_tag(tag=None, *, user_id=None) async

Set or clear a member's text tag in the current group (Bot API 9.5+).

reply_rich(rich_msg=None, *, html=None, markdown=None, blocks=None, media=None, is_rtl=None, skip_entity_detection=None, reply_markup=None) async

Reply with a Bot API 10.1+ Rich Message.

stream_rich(*, draft_id=None, is_rtl=None, can_stop=False, keep_on_stop=False, min_interval=0.25, finalize=True, mode='html')

Stream partial Rich Messages live using Bot API sendRichMessageDraft.

shirdal.engine.fsm.StatesGroup

Declarative container for multi-step conversation states.

shirdal.engine.fsm.FSMContext

Ergonomic state helper attached to ctx.state.

shirdal.engine.fsm.FSMStrategy

Bases: str, Enum

Keying strategy for FSM state isolation.