Discord Bot Setup

The Outpost Discord bot provides slash commands for ticket management, automatic thread creation for support requests, and real-time sync between Discord and the Outpost dashboard.

Create a Discord Application

  1. Go to the Discord Developer Portal
  2. Click New Application and name it (e.g., "Outpost Support")
  3. Go to the Bot section and click Add Bot
  4. Copy the Bot Token — you will need this for DISCORD_BOT_TOKEN
  5. Note the Application ID from the General Information page — this is DISCORD_CLIENT_ID

Configure Bot Permissions

The bot requires the following permissions:

Configure Gateway Intents

In the Bot settings, enable these Privileged Gateway Intents:

Invite the Bot

Generate an invite URL with the OAuth2 URL Generator:

  1. Go to OAuth2 → URL Generator
  2. Select scopes: bot and applications.commands
  3. Select the permissions listed above
  4. Copy the generated URL and open it to invite the bot to your server

Environment Variables

Add these to your .env file:

.env env
# Discord Bot
DISCORD_BOT_TOKEN=your-bot-token-here
DISCORD_CLIENT_ID=your-application-id
DISCORD_GUILD_ID=your-server-id
DISCORD_SUPPORT_CHANNEL=channel-id-for-support

Development tip: Set DISCORD_GUILD_ID for faster slash command registration. Guild commands update instantly; global commands can take up to an hour to propagate.

Slash Commands

The bot registers these slash commands:

CommandDescription
/ticket createCreate a new support ticket from a Discord message
/ticket statusCheck the status of an existing ticket
/ticket closeClose a resolved ticket
/ticket assignAssign a ticket to a team member
/searchSearch the knowledge base for answers
/helpShow available commands and usage

Thread-Based Support

When a user posts in the support channel, the bot can automatically:

  1. Create a thread for the conversation
  2. Run AI triage to classify and prioritize
  3. Search the knowledge base for relevant answers
  4. Post suggested solutions as the first reply
  5. Create a ticket in Outpost linked to the thread

Thread auto-creation is controlled by the DISCORD_SUPPORT_CHANNEL setting. Messages in other channels are ignored unless a slash command is used.