Command permission system
The bot has a built-in system for granting command permissions to specific users or user groups (roles). The bot owner can customize this through the Core module, while developers can set default permission values for handlers.
Некоторые роли нельзя присваивать конкретным людям, они фиксируются на абстрактных группах людей. Среди них -
owner
- Bot owner (configurable in config)chat_owner
- Chat Ownerchat_admins
- Chat Administratorsall
- All users (it is useless to set as default value)
Setting the default value is done via the @allowed_for
decorator from base.module
:
Permissions can also be set on callback query and message handlers, but they cannot currently be overridden via the /allow_cmd
command
Last updated