Discord
The Discord module: site events in staff channels with action buttons, private threads for requests made in Discord, the /link command and a Discord server block for Studio.
The module turns the site bot into a staff workplace in Discord. A new report, a punishment issued in Sentinel or a case decision arrives as a message in a staff channel, mentioning a role and carrying the "Take" and "Lift" buttons. A support request opened from Discord gets a private thread where the bot copies the staff answers.

| Dependencies | Games | Permissions | Studio blocks | Bot commands | Cron tasks |
|---|---|---|---|---|---|
| Flute 2.0; Tickets optional | any | admin.discord, admin.discord.view | "Discord server" (discord.invite) | /link | "Discord: forget messages of long-closed objects", daily |
What the module adds to the engine
The bot itself belongs to the engine: connecting the application, the token, direct-message notifications to players and commands like /online are covered in bots. Giving out Discord roles based on site roles is also the engine's job, see Discord sync. The module works through the same bot and repeats none of that.
| What | Where |
|---|---|
| "Site event → channel" routes with a role mention and buttons | AdminDiscord: channels |
Private threads for requests opened in Discord with /ticket | the module "Settings", needs the Tickets module |
The /link command: tells how to link Discord to the account | the module "Settings" |
| The "Discord server" block with member counts and an invite link | Studio |
Install and first setup
Connect the engine bot
Open AdminBotsDiscord and finish the wizard, including the "Server" step. The module posts to channels of the Discord server chosen there. Until the bot is connected, the module screen shows "The site bot is not connected to a Discord server yet, so nothing will be sent.", and routes get the state "Not delivered: the bot is not connected".
Install the module
Install the module from the marketplace as described in first steps. The admin menu gets a "Discord: channels" item, and its "Bot setup" button leads back to the engine wizard.
Ask the staff to link Discord
Buttons under messages and staff commands recognise a staff member by the Discord linked to their site account. While someone has not linked it, the screen says, for example, "2 staff members have not linked Discord to the site: staff buttons and commands will not work for them.".
Reports in the moderators' channel
Say the moderators should learn about a new report at once, and see punishments in a separate channel with a button to lift them.
Add a route
On AdminDiscord: channels click "Add a route". In "Site event" choose "A player was reported": the list holds the same events as a webhook subscription. In "Channel" choose the moderators' closed channel, and in "Mention a role" their Discord role.

Narrow it to a server and turn buttons on
"Only from server" lets through the events of one game server; empty means all of them. "Action buttons" adds "Take" under records from the "Reports & requests" queue, and "Lift" under "Punishment issued". Only staff with the right on the site can press them.
Check the channel
Save the route and click "Test message". The channel gets "Route check" with the text "The bot can write to this channel.".
A repeated event about the same object edits the message already sent instead of posting a new one. When a case is closed or a punishment is lifted or expires, its message turns green and loses the action buttons, even if no route follows the final event. The role is mentioned only in a new message. IP addresses, mail, phone numbers, tokens and passwords never get into messages.
If every member of the server sees a route's channel, saving shows "Route saved, but every member of the server sees the channel.", and the list marks the channel with "everyone sees it".
Request threads
With the Tickets module, a player can open a request from Discord with /ticket. To keep the conversation there, choose a channel in "Channel for request threads" under AdminDiscord: channelsSettings. The bot opens a private thread named "#number subject" in it and adds the author.
The thread receives the staff answers and the closing of the request. The player answers with the "Reply" button, and the answer lands in the request on the site. Staff notes are not copied. Until a channel is chosen, the routes screen hints "Requests from Discord get no threads".
The Discord server block in Studio
The block shows the name and icon of the server the bot is on, the member and online counts, and a "Join" button. Its fields are "Title" (empty means the server name), "Text", "Invite link", "Button label" and "Show member counts". The button appears only when an invite link is set. Server data is refreshed every five minutes.

Settings
AdminDiscord: channelsSettings
| Field | What it changes | Default |
|---|---|---|
| "The /link command" | tells a Discord user how to link their account to the site | on |
| "Channel for request threads" | where the bot opens a thread for every request made from Discord | "Do not open threads" |
| "Hide a thread after silence of" | when Discord hides a silent thread from the list: 1 h, 1, 3 or 7 d | 1 d |
| "Days to remember messages" | when the link between a message and a closed object is forgotten; the message stays | 90 |
Other bot commands are switched in their own modules' settings and on the bots' "Commands" tab. The admin.discord permission gives routes and settings, admin.discord.view only viewing the routes.
For developers
A route listens to WebhookEventFired, so any event registered with WebhookEvents::register() fits, even with no webhook subscriptions. The object of a message comes from caseId, ticketId, punishmentId or id in the event data. An event ending in resolved, closed, lifted, expired, deleted or refunded closes every open message about that object.
Messages go out through the queue. If only the scheduler works the queue, a message reaches the channel up to a minute later, see queue. The module opens threads on tickets.opened_in_bot and updates them on tickets.replied and tickets.closed. Routes are readable through the API as the discord-routes resource, read only, with admin.discord.view.
How the core side works: Events and listeners, API keys and the REST API, Module REST API, Module permissions.
Troubleshooting
For any other message, use the error lookup.
Not delivered: the bot is not connected
The module sees no configured engine bot. Go through the wizard in "Bots" → "Discord" up to the "Server" step and click "Check again" on the "Done" step.
Discord did not take the message
This is how the answer to "Test message" starts; Discord gives the reason after the colon. If it denies access, let the bot's role write to that channel.
| Message | What to do |
|---|---|
| "Pick an event from the list." | the event is picked from the list, a custom name does not work |
| "Pick a channel." | choose a text channel of the bot's server or paste its id |
| "This is not a Discord role id." | "Mention a role" needs the role id, not its name |
| "No such server." | choose a server from the "Only from server" list or leave it empty |
| the "Take" or "Lift" button does nothing | the staff member has not linked Discord to the account or lacks the right on the site |