raito.plugins.conversations.registry module¶
- class raito.plugins.conversations.registry.ConversationData(future, filters)[исходный код]¶
Базовые классы:
NamedTupleContainer for an active conversation.
Stores the Future object awaiting a message and the filters to apply.
- Параметры:
- class raito.plugins.conversations.registry.ConversationRegistry[исходный код]¶
Базовые классы:
objectRegistry for managing active conversations with users.
This class allows setting up a «wait for message» scenario where a handler can pause and wait for a specific message from a user, optionally filtered by aiogram filters.
- STATE = 'raito__conversation'¶
- listen(key, *filters)[исходный код]¶
Start listening for a message with a specific StorageKey.
- get_filters(key)[исходный код]¶
Get the filters associated with an active conversation.
- resolve(key, message)[исходный код]¶
Complete the conversation with a received message.
- Параметры:
key (StorageKey) – StorageKey identifying the conversation
message (Message) – Message object that satisfies the filters
- Тип результата:
None
- cancel(key)[исходный код]¶
Cancel an active conversation.
Cancels the Future and removes the conversation from the registry.
- Параметры:
key (StorageKey) – StorageKey identifying the conversation
- Тип результата:
None