Discord Bot Setup Guide
Invite the GameGrid Discord Bot, create a key with the right scopes, link it, decide which Discord roles get which level of control, and point commands at the right server.
What you need first
Three things, and the order matters:
- Manage Server permission in the Discord server you are setting up, or ownership of it.
- At least one GameGrid server on your account.
- An API key created for the bot, with the scopes below. Create it before you start -
/setupwill not accept anything else.
Setting up takes about five minutes. The bot never asks for your GameGrid password; the API key is the only credential it holds.
Step 1 - Create the key
In the customer panel, go to Account → API Keys and create a key named for the bot - discord-bot is fine.
Do not reuse a key you already use for scripts. A dedicated key means you can rotate or revoke the bot without breaking anything else, and the audit trail shows which integration made each call.
Restrict the key to the servers this Discord community actually runs, if you have others. Then choose scopes.
The scopes, by what you want to enable
Grant only the rows you want. Each block is independent - skipping one just means those commands return a scope error.
| To enable | Grant |
|---|---|
The minimum useful bot - /servers, /server, /status, /check-update, and how anyone finds a server id | servers:read |
| Start, stop, restart, and the restart button on a settings change | servers:lifecycle |
Setting an auto-restart schedule with /auto-restart <hours> | servers:write |
/console and console mirroring with /config live-console | console:read |
/command | console:write |
Log mirroring with /config live-logs | logs:read |
/files | files:read |
/settings view and /settings get | settings:read |
/settings set | settings:read and settings:write |
/players | players:read and servers:read |
/backups list | backups:read |
/backups create | backups:create |
/backups delete | backups:write |
/backups restore | backups:restore |
/mods list and /mods search | mods:read |
/mods install, /mods uninstall, /mods toggle | mods:write |
/windrose set, /windrose enable, /windrose disable | windrose:admin |
/account | account:read |
/billing | billing:read |
/tickets and /ticket | tickets:read |
| Player economy commands and the chat bridge reading | economy:read |
/buy, /link, /unlink, /daily, and Discord-to-game chat | economy:write |
/award, /refund, /shop-admin, /economy-stats, /economy-config, /economy-earn | economy:admin |
/preset list, /preset view, /event list, /event status, /event log | config_events:read |
/preset delete, /event schedule, /event update | config_events:write |
/event start, /event end, /event cancel | config_events:control |
/preset apply | config_events:write and config_events:control |
/map link, /map players, /map status, /map region | map:read |
/command-schedule list, /command-schedule catalog, /command-schedule show, /command-schedule history | command_schedules:read |
/command-schedule create, /command-schedule edit, /command-schedule delete, /command-schedule toggle | command_schedules:write |
/command-schedule run | command_schedules:control |
To enable every command the bot has, grant all 30 of these:
servers:read,servers:write,servers:lifecycle,console:read,console:write,logs:read,files:read,settings:read,settings:write,players:read,backups:read,backups:create,backups:write,backups:restore,mods:read,mods:write,windrose:admin,account:read,billing:read,tickets:read,economy:read,economy:write,economy:admin,config_events:read,config_events:write,config_events:control,map:read,command_schedules:read,command_schedules:write,command_schedules:control.
The "Discord Bot" preset in the key-creation screen is a starting point, not the full set. It covers the common read and control commands but omits logs:read, files:read, settings:write, servers:write, the three write-side backup scopes, mods:write, windrose:admin, billing:read and all three economy scopes. If you want the economy commands, the chat bridge, backups beyond listing, or log mirroring, add those scopes yourself.
Copy the key. It is shown once.
Step 2 - Invite the bot
Use the invite link on the Discord Bot page in the panel. It requests four Discord permissions and nothing more:
| Permission | Why |
|---|---|
| View Channel | To see the channel it is asked to post in |
| Send Messages | To answer commands |
| Embed Links | Command replies are embeds |
| Use Application Commands | To register its slash commands |
It does not ask to read message history, manage messages, mention everyone, kick, ban, or manage roles. Pick your Discord server and authorize. Commands appear within a minute or two.
Step 3 - Link the key
In any channel the bot can see:
/setup api-key:gsk_your_key_hereThe reply is private, so your key is never posted to the channel. The bot verifies the key against the API before storing anything, then encrypts it at rest.
| If you see | It means |
|---|---|
| Setup complete | Done - move on to roles |
| The key was rejected | Wrong key, a typo, or the key has been revoked. Check it in the panel |
| You need Manage Server | Ask the Discord server owner to run it, or to give you that permission |
Who can re-run `/setup` later is narrower than who can run it first. The first
/setupneeds Manage Server. Re-linking a different key afterwards is limited to the Discord server owner and the person who ran `/setup` originally. And a successful re-link clears every role grant, channel binding and live mirror - see Discord Bot Permissions & Security before you rotate.
Step 4 - Decide who can do what
Until you grant a role, nobody can run anything except the setup user and the Discord server owner. Map roles to levels:
/config role role:@Moderators level:Console Access
/config role role:@Admins level:Full Access| Level | Covers |
|---|---|
| No Access | Nothing - the default |
| Read Only | Status, lists, settings and mod listings, player economy commands |
| Console Access | The above, plus /console and /command |
| Full Access | The above, plus lifecycle, backups, settings writes, mods, economy admin, events |
| Owner | The above, plus /account, /billing, /tickets |
A member gets the highest level across all their roles. @everyone can be granted Read Only at most - the bot refuses anything higher.
Check your work with /config view, which lists the linked key id, your channels, the default server and every role grant.
Step 5 - Point commands at the right server
Every command takes an optional server-id. When it is left out, the bot resolves the server in this order:
1. The server bound to the channel the command was run in.
2. The Discord server's default server.
3. Neither - the bot says so and names all three ways to fix it.
Run /servers to see your server ids, then set whichever fits:
/config default-server server-id:srv_abc123
/config channel-server channel:#minecraft server-id:srv_abc123Channel bindings are the better answer once you run more than one server: #minecraft and #valheim each act on their own server, and nobody has to remember an id. To unbind a channel, run /config channel-server for it with no server-id.
Optional - channels the bot can use
| Command | Sets up |
|---|---|
/config log-channel | An audit log of every command run through the bot, and who ran it |
/config alert-channel | Automatic alerts when a server starts, stops or crashes |
/config command-channel | Restricts /command to one channel. Only `/command` - other commands, including /console, are unaffected |
/config live-console | Mirrors a server's console into a channel |
/config live-logs | Mirrors a server's log file into a channel |
/chat-link | Two-way chat between a Discord channel and in-game chat |
Live mirrors and the alert channel should point at channels your admins can read and your members cannot. Credentials and IP addresses are redacted from mirrored output, but console text is still console text.
A few numbers worth knowing when you set these up. Alerts are checked every 30 seconds, and only fire on real transitions - a server going from stopped to running, or crashing. Console and log mirrors update every 10 seconds, in batches of up to 40 lines. The chat bridge polls every 5 seconds and posts up to 10 messages per cycle, telling you in the channel if a busy period meant some were skipped.
One thing to know about alerts after a restart: the bot records each server's current state without announcing it when it starts up. That stops a burst of alerts every time the bot restarts - but it also means a change that happened while the bot was offline is never announced.
Check it works
Run these in order. Each one tests something different:
| Command | Confirms |
|---|---|
/config view | The key is linked and your roles are set |
/servers | The key can reach your servers - tests servers:read |
/status | Server resolution works without a server-id |
/console | Tests console:read and the Console Access level |
/help | Shows the caller their own access level - useful to hand to members |
If something is refused, the message tells you which gate stopped it. "You need at least Full Access" is a Discord role problem, fixed with /config role. A message naming a scope is a key problem, fixed by creating a new key in the panel with that scope added and re-running /setup.
Common problems
| Symptom | Cause and fix |
|---|---|
| Commands do not appear in Discord | Registration takes a minute or two. Fully restart your Discord client. Check the bot has Use Slash Commands in that channel |
| Every command says no permission | No role has been granted a level yet. Run /config role |
| "No server specified" | No channel binding and no default server. Run /servers, then /config default-server |
| One command fails with a scope error, the rest work | The key is missing that command's scope. Check the table in Step 1, create a new key, re-run /setup - and expect to re-apply your role grants |
| The bot was working and now rejects the key | The key expired or was revoked. Create a new one and re-run /setup |
| Chat bridge sends game chat to Discord but not back | Almost always the key lacking economy:write. Check the scope before anything else |
| Alerts stopped | Confirm the alert channel still exists and the bot can post in it |
| All my role grants vanished | A successful /setup re-link clears them. Re-apply with /config role |
Next: Discord Bot Commands Reference for every command, and Discord Bot Permissions & Security for how the two permission gates interact.
