raito.plugins.roles.filter module¶
- class raito.plugins.roles.filter.RoleFilter(slug, name, description, emoji)[исходный код]¶
Базовые классы:
FilterFilter for checking user roles.
This filter is used to verify whether the user associated with a Telegram event has a specific role assigned, such as «admin», «moderator», etc.
It also attaches role metadata to the handler’s flags for use in command registration and visualization logic.
- classmethod from_data(data)[исходный код]¶
Create a RoleFilter from a RoleData instance.
- Параметры:
data (RoleData) – RoleData instance containing role metadata
- Результат:
A new RoleFilter instance
- Тип результата:
- update_handler_flags(flags)[исходный код]¶
Attach role metadata to handler flags.
This allows external tools to collect and display role-related constraints.