β˜‘οΈModule permissions

The system of permissions for modules is implemented in the bot. What does it mean? A module can access additional features by specifying extensions in info.yaml. When installing a module, its permissions are shown to the user, and only after his consent the installation continues.

There are currently 3 permits available:

  • use_db - database usage (not strict dependency, if the database is disabled in the bot's config, the module can work)

  • require_db - use of the database by the module (strict dependency, if the database is disabled and the module requires it, it will be skipped when loaded)

  • use_loader- use of ModuleLoader object (the most dangerous permission, because with it the module gets control over the whole "inside" of the bot).

An example of setting permissions can be seen in the description of bot structure and modules.

Last updated