You can set custom permissions for ATOS commands according to what you want to do.

How it works

It is possible to write “rules” allowing or prohibiting a member, a role or a channel from using a command or a module. You can accumulate several rules to properly frame the context where members can use the bot.

If no rule is applicable, then the command will behave correctly (relying on permissions, moderator and administrator roles, whitelist/blacklist and channels ignored by the bot).

Rules priority

The rules defined on the subcommands override the rules of the parent command. Same for the commands which override the rules defined on the module.

If for example a member does not have the right to use the !checkin command but can use !checkin call, the member will not be able to use any !checkin subcommand except !checkin call. In addition, if a member does not have the right to use the Tournaments module but can use !bracket, he will not be able to use any tournament command except !bracket.


Finally, there is also an order of precedence on the “objects” that define your rule. By object, I mean a member, a role, a text or voice channel, or the entire server; what your rule applies to:

  1. User
  2. Voice channel
  3. Text channel
  4. Category of channels
  5. Role, from highest to lowest
  6. Server (default rules)
  7. Default commands

For example, if a role X does not have permission to use Audio commands but channel Y has permission, in this case members with role X will be able to use commands from the Audio module only when connected to the channel Y.

In DM, only global rules will be applied.

Commands

Commands Description
!permissions Base command for permissions
!permissions explain Brief explanation of the system
!permissions canrun Checks if a user can execute a certain command in the current channel
!permissions addserverrule Add a permissions rule
!permissions removeserverrule Take off one of your rule
!permissions setdefaultserverrule Adds a default permissions rule (will apply everywhere, minimum priority over other rules)
!permissions clearserverrules Clears all custom rules from the server
!permissions acl Set or display permissions from a YAML file

Examples

  • To prohibit tournament commands from everyone except a role :

    • !permissions setdefaultserverrule deny Tournaments
    • !permissions addserverrule allow Tournaments @Games
  • To give access to audio controls only to users in a certain voice channel :

    • !permissions setdefaultserverrule deny Audio
    • !permissions addserverrule allow Audio "Voice - Music"
  • To give access to the !setscore command to a role other than mod or T.O :

    • !permissions addserverrule allow setscore @Score Checker