System

Command rules

Server>commandrules>commandrules

Without a single rule, every command works everywhere. A rule changes that for one command, a channel, a role or the whole server.

In short

Without a rule, every command works everywhere, in every channel and for every member. A rule reserves a command for a specific place.

You use them to keep the bot quiet in chat channels and leave the game commands where they belong.

Getting started

1List the rules

Check what is already set before adding anything. A forgotten rule can block a command without you remembering it.

>commandrules list
2Allow a command

Give the command and its target: a channel, a role, or the whole server.

>commandrules allow
3Deny a command

A denial beats an approval at the same level. Re-read the list after setting it.

>commandrules deny

How it works

The bot checks the channel first, then the person's roles, then the server. The first rule that answers decides, and the next levels are not consulted.

Within one level, a denial beats an approval. A wildcard, * or all, targets a broad set without naming each command.

The 2 free commands are never closed: sudo and commandrules. A badly placed rule can therefore never stop you from fixing it.

  • A server rule is enough to close a command everywhere, and a channel rule reopens it where you want.
  • As 3 exits pass the rules, including the sudoer status, a closed command can still run for some members. Check who holds that status before assuming a command is closed.

Where a rule applies

Each rule targets a single level. The channel is the most specific, the server the widest.

LevelValueWhat it means
ChannelThe most specificA channel rule applies only to that channel and comes before the role and the server.
RoleFor a groupIt applies to everyone who holds the role. It comes after the channel and before the server.
ServerFor everyoneIt covers every other case. It is the last level consulted.

Who decides

The channel is checked first, then the roles, then the server. The first rule that answers applies.

1StateNamed rule

A rule named after the command beats the wildcard of the same level.

A rule targets the command or one of its branches

2StateDenial

Within one level, a denial beats an approval.

An approval and a denial compete for the same level

3StateNext level

If nothing answers at this level, we move up to the wider one. If no level answers, the command runs.

No rule targets the command at this level

What gets through anyway

3 cases bypass the rules.

  • Sudoer · Passes everywhere. A sudoer ignores the rules, whatever the channel.
  • Free commands · 2 commands. sudo and commandrules always pass, so nobody gets locked out.
  • No rule · Everything is allowed. If the server has no rule at all, every command runs.

Setting a rule

Reading, allowing or denying is all it takes.

L

Read

See the state

>commandrules list shows the rules in force.

A

Allow

Open

>commandrules allow opens the command for the server, a channel or a role.

R

Deny

Close

>commandrules deny closes the command for the server, a channel or a role.

Undoing

From the most targeted to the widest.

1StateOne channel

Clears the rules of a single channel, the others stay.

Rules of the other channels, roles and the server stay

2StateThe server

Clears the rules set at server level.

Channels and roles keep their rules

3StateAll

Clears every rule on the server at once, channels and roles included.

No rule is left

The targets

A rule targets a command, a branch or a wildcard.

FormExampleCovers
CommandA whole commandThe command and everything it contains
BranchA specific branch, written with its dotThat branch and everything it contains
Wildcard* or allEvery command of the level

Where a rule applies, by hand

pick a row
TierThe most specificChannel
Tier

A channel rule applies only to that channel and comes before the role and the server.

Good to know

  • The channel wins. A channel rule comes before the role and the server. If a command stays blocked in one place only, check that channel first.
  • Some commands stay free. sudo and commandrules are never closed. You can therefore never cut yourself off from managing the rules.
  • The wildcard is broad. A* rule covers a whole level at once. It also cuts commands you did not think of.
Reference

Everything you can type for this system.

All commands

>commandrules, >commandrules, >commandrules, >commandrules, >commandrules, >sudo
>commandrules · cr

Manage the command rules for the server

Example>commandrules
>commandrules allow

Allow a command in a specific target

Example>commandrules allow
>commandrules deny

Deny a command in a specific target

Example>commandrules deny
>commandrules list

List all command rules

Example>commandrules list
>commandrules panel

Open the command rules panel

Example>commandrules panel
>commandrules reset

Reset the command rules

Example>commandrules reset
>commandrules · cr

Manage the command rules for the server

Example>commandrules
>commandrules allow

Allow a command in a specific target

Example>commandrules allow
>commandrules deny

Deny a command in a specific target

Example>commandrules deny
>commandrules list

List all command rules

Example>commandrules list
>commandrules panel

Open the command rules panel

Example>commandrules panel
>commandrules reset

Reset the command rules

Example>commandrules reset
>commandrules · cr

Manage the command rules for the server

Example>commandrules
>commandrules allow

Allow a command in a specific target

Example>commandrules allow
>commandrules deny

Deny a command in a specific target

Example>commandrules deny
>commandrules list

List all command rules

Example>commandrules list
>commandrules panel

Open the command rules panel

Example>commandrules panel
>commandrules reset

Reset the command rules

Example>commandrules reset
>commandrules · cr

Manage the command rules for the server

Example>commandrules
>commandrules allow

Allow a command in a specific target

Example>commandrules allow
>commandrules deny

Deny a command in a specific target

Example>commandrules deny
>commandrules list

List all command rules

Example>commandrules list
>commandrules panel

Open the command rules panel

Example>commandrules panel
>commandrules reset

Reset the command rules

Example>commandrules reset
>commandrules · cr

Manage the command rules for the server

Example>commandrules
>commandrules allow

Allow a command in a specific target

Example>commandrules allow
>commandrules deny

Deny a command in a specific target

Example>commandrules deny
>commandrules list

List all command rules

Example>commandrules list
>commandrules panel

Open the command rules panel

Example>commandrules panel
>commandrules reset

Reset the command rules

Example>commandrules reset
>sudo

Lets administrators bypass the command rules in a server

Example>sudo

Neighbouring concepts

Rules touch two other systems. Each has its own page.

Other pages in this family