discordDiscord Integration

The Discord integration lets users raise support tickets directly from your Discord server. When a ticket is created, the bot opens a dedicated thread or channel, posts a rich embed, and keeps it in sync with the web dashboard.

Overview

  • Users click a Raise a Ticket button posted by the bot in your support channel

  • A modal collects the subject and description

  • The bot creates a ticket in the dashboard and opens a private thread or channel

  • Staff can claim, close, and update tickets from either Discord or the web dashboard

  • Replies made in the web dashboard are posted back to the Discord thread

1. Create a Discord application and bot

1

Go to the Discord Developer Portal

Go to discord.com/developers/applicationsarrow-up-right and click New Application.

2

Name the application

Give it a name (e.g. DrakoTickets) and click Create.

3

Add a bot

Open the Bot tab and click Add Bot.

4

Copy the bot token

Under Token, click Reset Token and copy the token β€” you will need this shortly.

5

Enable privileged gateway intents

Scroll down to Privileged Gateway Intents and enable:

  • Server Members Intent

  • Message Content Intent

6

Save changes

Click Save Changes.

2. Set the bot token in your environment

Add the token to your .env.local (or Vercel environment variables):

DISCORD_BOT_TOKEN=your-discord-bot-token

Restart the application after adding this variable.

3. Invite the bot to your server

1

Open the URL Generator

In the Developer Portal, open the OAuth2 β†’ URL Generator tab.

2

Select the required scopes

Under Scopes, select bot and applications.commands.

3

Select bot permissions

Under Bot Permissions, select:

  • Manage Channels

  • Send Messages

  • Embed Links

  • Read Message History

  • Manage Threads

  • Create Public Threads

  • Create Private Threads

4

Invite the bot

Copy the generated URL and open it in your browser to invite the bot to your server.

4. Enable Developer Mode in Discord

You need Developer Mode on to copy IDs.

1

Enable Developer Mode

Open Discord β†’ User Settings β†’ Advanced β†’ Enable Developer Mode.

2

Copy IDs

You can now right-click any server, channel, or role and select Copy ID.

5. Configure the bot in the dashboard

Go to Settings β†’ Discord and fill in the following fields.

Bot Configuration

Field
How to get it

Guild (Server) ID

Right-click your server name β†’ Copy Server ID

Support Channel ID

Right-click the channel where the ticket button will appear β†’ Copy Channel ID

Support Role ID (optional)

Right-click the role that should have access to ticket channels β†’ Copy Role ID

Ticket Channel Mode

Choose how new tickets are created in Discord:

  • Thread β€” creates a private thread inside the support channel (recommended, keeps the channel tidy)

  • Channel β€” creates a new channel inside a category

If you choose Channel, also fill in the Ticket Category ID (right-click the category β†’ Copy ID).

6. Post the support panel

Once the bot configuration is saved, click Post Panel in the dashboard. The bot will post an embed with a Raise a Ticket button to your support channel. Users click this button to open the ticket creation modal.

circle-info

You only need to post the panel once. If you update the embed appearance, click Update Embed to refresh the existing message without re-posting.

Customising the embeds

Support panel embed

This is the message that sits in your support channel with the button.

Field
Description

Title

Heading of the embed, e.g. Support

Description

Body text shown below the title

Colour

Hex colour of the embed's left border

Image URL

Optional large image shown in the embed

Footer Text / Icon

Optional footer line at the bottom

Author Name / Icon

Optional author line at the top

Button Label

Text on the button, e.g. Raise a Ticket

Button Emoji

Emoji shown on the button, e.g. 🎫

Ticket embed

This is the embed posted inside each new ticket thread or channel.

Field
Description

Title

Heading, e.g. 🎫 New Support Ticket

Colour

Hex colour of the embed

Description

Template for the embed body β€” supports variables (see below)

Footer / Author

Same as the panel embed

Show Thumbnail

Shows the requester's Discord avatar in the top-right corner

Available template variables

Variable
Description

{user}

The Discord username of the requester

{ticket_number}

The ticket number, e.g. TK-0042

{subject}

The ticket subject entered in the modal

{description}

The ticket description entered in the modal

{response_time}

Expected response time (from SLA policy if configured)

{claimed_by}

The technician who claimed the ticket, or Unclaimed

Troubleshooting

The bot is online but the panel button does nothing

  • Make sure APP_PROTOCOL, APP_HOST, and APP_PORT are set correctly so the bot can reach the web app's interaction endpoint at /api/discord/interaction.

  • Check that the bot has the applications.commands scope.

Ticket channels are not being created

  • Verify the bot has Manage Channels permission in the category or server.

  • If using Channel mode, confirm the Ticket Category ID is correct.

Replies from the dashboard are not appearing in Discord

  • Ensure DISCORD_BOT_TOKEN is set and the bot is still in the server.

  • Check the server logs for [discord/update-embed] errors.