Discord Setup
Every report gets its own thread in your Discord. Staff can answer in the thread or press Claim, Snooze and Close, and it happens in-game too. A player's reply shows up in the thread, and a staff reply in the thread shows up in the player's report.
The bot runs inside the resource. There's nothing extra to start or install. Setup takes about five minutes.
1. Create the bot
- Go to the Discord Developer Portal and create a new application.
- Open the Bot tab, reset the token and copy it. This is your
token. - On the same tab, turn on Message Content Intent. Without it the bot can't read what staff type in a thread.
2. Invite it
Under OAuth2, use the URL generator. Pick the scopes bot and applications.commands, and give it these permissions:
- View Channels
- Send Messages and Send Messages in Threads
- Create Public Threads and Manage Threads
- Embed Links
- Read Message History
Open the link it gives you and add the bot to your server.
3. Copy the IDs
Turn on Developer Mode in Discord (User Settings → Advanced). Then right-click and choose Copy ID for:
| What | Setting |
|---|---|
| Your server | guildId |
| The channel where reports should appear | channelId |
| Your staff role(s) | staffRoleIds |
| A role to ping for urgent reports (optional) | pingRoleId |
| A channel for appeals (optional) | appealsChannelId |
4. Fill in the config
Open config_server.lua and edit the bot section. Keep the quotes around every ID.
bot = {
enabled = true,
token = 'PASTE_THE_TOKEN_HERE',
guildId = '123456789012345678',
channelId = '123456789012345678',
channelType = 'text', -- 'forum' if the channel is a forum channel
staffRoleIds = { '123456789012345678' },
pingRoleId = '',
}
Restart the resource. The console should say that the bot connected.
Your bot token is a password. Keep it in config_server.lua only and never share it. If it leaks, reset it in the Developer Portal straight away.
5. Link staff accounts (optional)
Without linking, actions from Discord show the person's Discord name. Linking shows their in-game staff name instead.
- In-game, as staff, type
/linkdiscord(or open Settings → Discord) to get a code. - In Discord, type
/link code:ABC123. The code works for 5 minutes.
Set requireLink = true if only linked staff should be able to act from Discord.
What staff can do from Discord
- Answer the player by writing in the report's thread. Only people with a role in
staffRoleIdsare passed on. - Claim, snooze, close or reopen with the buttons under the report.
- Accept or deny ban appeals and warning disputes in the appeals channel. This needs a role in
adminRoleIds, orstaffRoleIdswhen that list is empty.
Appeals from Discord
A banned player can't join, so they can appeal in your Discord with /appeal reason:.... The script finds the ban through the Discord ID saved with it. That ID is only saved if the player was online with Discord open when they were banned. Otherwise the bot tells them to contact staff.
Troubleshooting
| What you see | What to do |
|---|---|
Disallowed intents in the console | Turn on Message Content Intent on the Bot tab |
The bot token is invalid | Reset the token and paste the new one with no spaces |
| Threads appear but replies are ignored | The person has no role in staffRoleIds, or Message Content Intent is off. The console prints the role IDs it saw |
Missing Access or Missing Permissions | Give the bot access to the channel and the permissions from step 2 |
/link and /appeal don't show up | Invite the bot again with the applications.commands scope |
no global WebSocket | Update your server build to one with Node 22 |
| Messages come twice | Leave Config.Discord.webhook empty. With the bot on, the webhook is skipped anyway |