quackamollie.core.bot.decorator.acknowledge_with_reactions moduleΒΆ
- quackamollie.core.bot.decorator.acknowledge_with_reactions.acknowledge_with_reactions(func: Callable | None = None, enable_read_reaction: bool = True, read_reaction_emoji: str = 'π€', enable_answered_reaction: bool = True, answered_reaction_emoji: str = 'π') Callable[source]ΒΆ
Decorator to encapsulate aiogram message handlers in order to automatically react with emojis to the message sent when entering the decorator and after calling the encapsulated function. If the given argument is not an aiogram.types.Message, no reactions are emitted.
- Parameters:
func (Optional[Callable]) β The function to encapsulate, if None the decorator returns a partial instead
enable_read_reaction (bool) β Enable reaction when receiving the message
read_reaction_emoji (str) β The emoji to use when receiving the message
enable_answered_reaction (bool) β Enable reaction after the call of the decorated function
answered_reaction_emoji (str) β The emoji to use after calling the decorated function
- Returns:
The decorated function or a partial if func argument is None
- Return type:
Callable