mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added FSMStrategy to the documentation
This commit is contained in:
parent
60f93b3b46
commit
2215df7a0f
4 changed files with 20 additions and 1 deletions
|
|
@ -3,11 +3,20 @@ from typing import Optional, Tuple
|
|||
|
||||
|
||||
class FSMStrategy(Enum):
|
||||
"""
|
||||
FSM strategy for storage key generation.
|
||||
"""
|
||||
|
||||
USER_IN_CHAT = auto()
|
||||
"""State will be stored for each user in chat."""
|
||||
CHAT = auto()
|
||||
"""State will be stored for each chat globally without separating by users."""
|
||||
GLOBAL_USER = auto()
|
||||
"""State will be stored globally for each user globally."""
|
||||
USER_IN_TOPIC = auto()
|
||||
"""State will be stored for each user in chat and topic."""
|
||||
CHAT_TOPIC = auto()
|
||||
"""State will be stored for each chat and topic, but not separated by users."""
|
||||
|
||||
|
||||
def apply_strategy(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue