Skip to content

Commit 4a346ea

Browse files
committed
Ticketbot: requiredRoles in der Konfiguration (v2.22.0)
1 parent 3d25554 commit 4a346ea

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎discord/discord_ticketbot/configuration.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Supported formats: PNG, JPG, GIF, WEBP. Run `/setup` again after adding or chang
6565
"ticketNameOption": "", // USERNAME, USERID, TICKETCOUNT or ""
6666
"customDescription": "...", // Variables: REASON1, REASON2, USERNAME, USERID
6767
"cantAccess": ["roleId"],
68+
"requiredRoles": [], // Empty = everyone, otherwise one of these roles is needed
6869
"staffRoles": [], // Type-specific staff roles, empty = global staff roles
6970
"askQuestions": true,
7071
"questions": [
@@ -75,14 +76,16 @@ Supported formats: PNG, JPG, GIF, WEBP. Run `/setup` again after adding or chang
7576

7677
> **`staffRoles` replaces the global roles.** A type with its own `staffRoles` is handled by those roles only: they see the channel, can claim, lock, move and close, and the staff reminder pings them. The global `rolesWhoHaveAccessToTheTickets` do not act on such a ticket. If the global staff role should keep access, add it to the type's `staffRoles`. Administrators always have access.
7778
79+
> **`requiredRoles` limits who can open a type.** Empty (the default) means everyone may open it. With roles listed, a member needs at least one of them, otherwise the bot refuses with "This category is only open to members with a specific role." Use it for a category like script support that only sponsors may open, while order or invoice types stay open to all. `cantAccess` still applies on top and wins: a member with a blocked role cannot open the type even if they hold a required role. There is no exception for staff or administrators, so give your team one of the roles if they should be able to open the type themselves. With the `BUTTON` panel, the type list a member sees only offers the types they may open; if just one is left it opens directly. The `SELECT_MENU` panel is the same for everyone, so there the refusal message is shown after picking.
80+
7881
### Open Restrictions
7982

8083
```json
8184
"rolesWhoCanNotCreateTickets": [], // roles that cannot open any ticket
8285
"maxTicketOpened": 2 // open tickets per user, 0 = unlimited
8386
```
8487

85-
Together with `cantAccess` per type and the `/blacklist`, these are checked on every way a ticket can be opened, and the open limit cannot be bypassed by clicking quickly several times.
88+
Together with `cantAccess` and `requiredRoles` per type and the `/blacklist`, these are checked on every way a ticket can be opened, and the open limit cannot be bypassed by clicking quickly several times.
8689

8790
### Bot Status
8891

‎i18n/de/docusaurus-plugin-content-docs-discord/current/discord_ticketbot/configuration.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ hinzugefügt oder ausgetauscht hast.
6868
"ticketNameOption": "", // USERNAME, USERID, TICKETCOUNT oder ""
6969
"customDescription": "...", // Variablen: REASON1, REASON2, USERNAME, USERID
7070
"cantAccess": ["roleId"],
71+
"requiredRoles": [], // Leer = alle, sonst wird eine dieser Rollen gebraucht
7172
"staffRoles": [], // Team-Rollen nur für diesen Typ, leer = globale Team-Rollen
7273
"askQuestions": true,
7374
"questions": [
@@ -78,14 +79,16 @@ hinzugefügt oder ausgetauscht hast.
7879

7980
> **`staffRoles` ersetzt die globalen Rollen.** Ein Typ mit eigenen `staffRoles` wird nur von diesen Rollen betreut: Sie sehen den Kanal, können übernehmen, sperren, verschieben und schließen, und die Team-Erinnerung pingt sie. Die globalen `rolesWhoHaveAccessToTheTickets` wirken bei so einem Ticket nicht. Soll die globale Team-Rolle Zugriff behalten, gehört sie in die `staffRoles` des Typs. Administratoren haben immer Zugriff.
8081
82+
> **`requiredRoles` legt fest, wer einen Typ öffnen darf.** Leer (die Vorgabe) heißt, alle dürfen ihn öffnen. Stehen Rollen drin, braucht ein Mitglied mindestens eine davon, sonst lehnt der Bot mit "Für diese Kategorie brauchst du eine bestimmte Rolle." ab. So lässt sich etwa der Script-Support auf Sponsoren beschränken, während Bestellungen und Rechnungen für alle offen bleiben. `cantAccess` gilt zusätzlich und hat Vorrang: Wer eine gesperrte Rolle hat, kann den Typ nicht öffnen, auch wenn er eine der benötigten Rollen besitzt. Eine Ausnahme für Staff oder Administratoren gibt es nicht. Soll dein Team den Typ selbst öffnen können, gib ihm eine der Rollen. Beim Panel `BUTTON` zeigt die Typ-Auswahl nur die Typen, die das Mitglied öffnen darf; bleibt genau einer übrig, öffnet er direkt. Das Panel `SELECT_MENU` ist für alle gleich, dort erscheint die Ablehnung nach der Auswahl.
83+
8184
### Sperren beim Öffnen
8285

8386
```json
8487
"rolesWhoCanNotCreateTickets": [], // Rollen, die gar kein Ticket öffnen können
8588
"maxTicketOpened": 2 // offene Tickets pro Nutzer, 0 = unbegrenzt
8689
```
8790

88-
Zusammen mit `cantAccess` pro Typ und der `/blacklist` wird das auf jedem Weg geprüft, auf dem ein Ticket entstehen kann, und das Limit lässt sich auch durch schnelles Mehrfachklicken nicht umgehen.
91+
Zusammen mit `cantAccess` und `requiredRoles` pro Typ und der `/blacklist` wird das auf jedem Weg geprüft, auf dem ein Ticket entstehen kann, und das Limit lässt sich auch durch schnelles Mehrfachklicken nicht umgehen.
8992

9093
### Bot-Status
9194

0 commit comments

Comments
 (0)