Skip to content
qwest.devChangelogGet Qwest

Set up the Discord bot

Create your own Discord bot for your Qwest.

2 min read

On your own Qwest, the Discord bot is your own Discord application. An instance admin sets it up once, in Qwest, then every project can use it. No .env to edit, no restart.

  1. Go to the Discord Developer Portal and click New Application. Name it (your players will see it), like Qwest or your studio’s name.
  2. On Bot, click Reset Token and copy the token. It’s shown only once.

In Qwest, open Instance admin›Discord, paste the token and click Set up.

Qwest asks Discord which application the token belongs to, registers the bot’s commands, and sets the application’s Interactions Endpoint URL to your address followed by /api/discord/interactions. When it’s done, it says the bot is ready.

The token is stored encrypted, like the other secrets Qwest keeps. To use another bot later, paste its token in the same place.

The bot is saved, but Discord can’t send it commands until it can reach your address. Qwest says why: usually it isn’t public yet, or doesn’t have HTTPS. Fix that, then click Point Discord here again.

You can also set it yourself: on the application’s General Information page, set Interactions Endpoint URL to the address Qwest shows (like https://qwest.yourstudio.com/api/discord/interactions) and click Save Changes.

A project owner opens Project settings›Discord and follows the two steps there: Add to Discord, then Get a code and type /qwest setup with it in the Discord server. See Discord for what your team and players can do with it.

If you’d rather keep it in the server’s settings, copy the Application ID and Public Key (on General Information) and the bot token into .env in your qwest folder:

DISCORD_APPLICATION_ID=123456789012345678
DISCORD_PUBLIC_KEY=abc123…
DISCORD_BOT_TOKEN=MTIz…

All three go together, and they win over Instance admin›Discord, which then only shows them. Restart with docker compose up -d; the logs (docker compose logs qwest) should say discord: commands registered. Then set the Interactions Endpoint URL as above, or click Point Discord here again in Qwest.