Skip to content

Commit a9edb9e

Browse files
committed
doc: Document restrictions
1 parent 70e0730 commit a9edb9e

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

docs/getting-started/restrictions.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,45 @@ sidebar_position: 3
33
---
44

55
# Restrictions
6-
Restrictions can be added to commands, modules or the entire guild. They allow for the most flexibility in defining which commands users can execute and where they can execute them
7-
8-
## Restriction Fields
96
![An image of two restrictions](/images/restrictions.jpg)
107

11-
* A restriction field will consist of several `restriction` cards and an `Add Restriction` field.
12-
* All the restrictions here will be checked to see if the user can run a command - in this example, the user would need both the ban and kick permission (provided by the `can.managechannels` and `can.kick` restrictions respectively)
8+
Restrictions can be added to commands, modules or the entire guild using the online dashboard. They allow for the most flexibility in defining which commands users can execute and where they can execute them.
9+
10+
:::note
11+
Mizar's restrictions system is completely separate to Discord's new [slash command permission system](https://discord.com/blog/slash-commands-permissions-discord-apps-bots). Mizar's restrictions are more powerful and apply to both [slash commands and text commands](./commands).
12+
13+
If you are having issues using this system, feel free to reach out on the [Support Discord](https://mizarbot.xyz/discord)
14+
:::
15+
16+
Restrictions are divided into multiple **Restriction Cards** - such as `cankick` and `staff`. These restriction cards can be created, accessed and edited across the whole guild admin dashboard - so, for example, the `staff` restriction card could be applied to several commands.
17+
18+
* For a user to run a command, they must meet **at least one** Restriction Card.
19+
20+
Within each restriction card, there are multiple **Restriction Paths** separated by the `Or` divider.
21+
22+
* For a user to pass a Restriction Card, they must meet **at least one** Restriction Path.
23+
24+
Within each restriction path, multiple individual **Restriction Conditions** can be set.
25+
26+
* For a user to pass a Restriction Path, they must meet **all** Restriction Conditions.
27+
28+
:::info
29+
**Example using the above configuration**
30+
31+
From the above image, the user must meet the following conditions:
32+
33+
* Meet the `cankick` Restriction Card, i.e.
34+
* Have the `Kick Members` Discord permission
35+
* **OR** meet the `staff` Restriction Card, i.e.
36+
* Have both the `Admin` Discord role **AND** be in the `#private` channel
37+
* **OR** be the user named `JTwhizzkid`
38+
:::
39+
1340

1441
## Adding a Restriction
1542
![An image of adding a restriction](/images/add-restriction.jpg)
1643

17-
* To add a new restriction to the list, you can either select an existing one by using the dropdown box or creating a new one by entering a new name.
18-
* By default, there should be at least one restriction by default - `bot.admin` is used by default to restrict who can access the admin panel, and can be selected here.
44+
To add a new restriction to the restrictions list, you can either select an existing one by using the dropdown box or creating a new one by entering a new name.
1945

2046
## Configuring a Restriction
2147
![A labelled image of an individual restriction](/images/restriction.jpg)

static/images/restrictions.jpg

2.44 KB
Loading

0 commit comments

Comments
 (0)