Skip to content

Discord Setup

Mathildeuh edited this page Sep 12, 2026 · 1 revision

Discord Setup

SOS-Staff needs a Discord bot application of its own - it does not reuse any other bot on your server.

1. Create the application and bot

  1. Go to the Discord Developer Portal and create a New Application.
  2. Open the Bot tab, click Reset Token to generate one, and copy it somewhere safe. You will not be able to see it again without regenerating it.
  3. Under Privileged Gateway Intents, enable Message Content Intent. SOS-Staff only requests the GUILD_MESSAGES and MESSAGE_CONTENT gateway intents - Message Content is the only one of those that Discord treats as privileged and requires you to switch on explicitly.

2. Invite the bot to your server

Use the OAuth2 URL Generator (OAuth2 tab), select the bot scope, and grant at least:

  • Manage Channels - creating a channel (and, on first use, a category) per ticket
  • Manage Roles - setting per-channel permission overwrites so only staff and the reporter can see a ticket's channel
  • Manage Webhooks - relaying a player's in-game chat into their ticket channel under their own name and skin
  • View Channels, Send Messages, Read Message History, Embed Links - the basics for posting and updating ticket embeds and buttons

Open the generated URL and add the bot to your server.

3. Give SOS-Staff the token

Set it as an environment variable rather than writing it into config.yml:

SOSSTAFF_DISCORD_TOKEN=your-bot-token

discord.token in config.yml is only ever used as a fallback if that environment variable isn't set - keep the real token out of any file you might commit or share, and rotate it in the Developer Portal immediately if it ever leaks.

4. Point the plugin at your server

At minimum, fill in on config.yml (then /sostaff reload, or restart):

  • discord.permissions.staff-roles - the Discord role ID(s) that should see every ticket channel
  • discord.mentions.on-create.roles and discord.mentions.on-escalate - who gets pinged, and when a ticket has gone unclaimed too long (escalation.no-claim-after-minutes)
  • categories - at least one ticket category; see Configuration for the full shape

Right-click your target server in Discord (with Developer Mode enabled in Discord's own settings) and Copy Server/Channel/Role ID to get any of the IDs above.

Clone this wiki locally