# Discord

> Connect Quickchat AI to Discord. Add the shared Quickchat AI bot in one click, give it a name for each server, or use your own Discord app for a custom avatar, direct messages, and AI Actions. Includes what to do when both bots end up in the same server.

There are two ways to connect your AI Agent to Discord:

1. **Add to your Discord server**: the recommended one-click flow. No Developer Portal and no bot token, live in under a minute.
2. **Use your own Discord app**: the advanced flow where you create a Discord application and supply a bot token yourself.

We recommend the one-click flow. You can switch to your own app later if you need the advanced features.

New to Quickchat AI? [Create a free account](https://app.quickchat.ai/register) first, then come back here. You can also read more about [Quickchat AI for Discord](https://quickchat.ai/discord).

## Connect with Discord (recommended)

In the Quickchat AI dashboard, open **External Apps** in the left sidebar, find **Discord**, and open it. Under **Connect**, review **Bot name in the new server**, which is prefilled with your AI Agent's name. You can edit it or leave it empty to use **Quickchat AI**, then click **Add to your Discord server**. You need the **Manage Server** permission on the target server.

![Add to your Discord server](https://docs.quickchat.ai/_astro/discord_oneclick.BbuESO2I.png)

You are redirected to Discord to authorize the shared **Quickchat AI** app. Pick the server you want and click **Authorize**. Quickchat applies the name you chose before the bot posts its one-time introduction: **"Ready! @mention me or use /ask to chat. Powered by Quickchat AI."** You are then brought back to Quickchat AI.

What happens next depends on your setup progress. If you are still setting up a new account, Quickchat confirms the connected server and shows **Describe the AI Agent you want to build**. Describe the bot's purpose in one sentence, then click **Create my AI Agent**. Quickchat creates its name, Main Prompt, Guidelines, and conversation starters for you.

Once the core identity is ready, add sources to the Knowledge Base for more accurate answers and add Actions when you want the bot to perform tasks. Continue to **Choose your plan**. Because Discord is already connected, Quickchat does not ask you to deploy it again. If setup was already complete when you authorized Discord, you return to the dashboard instead.

Authorization is complete at this point. 🎉 **Your AI Agent is live on Discord.** Members start a conversation by **@mentioning** it in a channel, and it replies in channels or threads.

Every Discord conversation appears in the Quickchat AI Inbox. When your AI Agent hands a conversation to a teammate, they can take over in the Inbox and reply directly to the same Discord channel, thread, or DM.

New Quickchat AI signups get a Discord-branded setup where they can describe the Agent they want or add it to Discord first. Whichever action they choose first, setup guides them through the other before the plan step.

### How members talk to the bot

**The bot does not reply to every message in a channel.** It answers when it is @mentioned, when someone uses the `/ask` command, when someone replies to one of its messages, and inside threads it created. Everything else it ignores on purpose, so it stays quiet in a busy server.

This is worth telling your members, because a plain message that gets no answer looks like a broken bot rather than a bot waiting to be addressed.

`/ask` is often the easier one to discover: typing `/` in any channel lists **"Ask the Quickchat AI agent a question"**, and it works where message content is restricted. It is available on the one-click bot only, so if you run your own Discord app, use @mentions.

### Message allowance

Every reply is generated by a language model and counts against your plan's AI message allowance. A busy server gets through a free allowance quickly, and once it runs out the bot says so in the channel instead of answering. The allowance resets each month.

### Managing your servers

The Discord page lists every server the shared bot is active in under **Connected servers**. From there you can:

- Change the bot's name later. Enter up to 32 characters under **Bot name in this server**, then click **Apply**. Clear it and click **Apply** to restore the shared **Quickchat AI** name.
- **Add to another server** with the same one-click flow. Review **Bot name in the new server** before authorizing, so one AI Agent can use a different name in each server.
- **Remove** the bot from a server. It leaves that server and stops replying, and you can add it again anytime.

Each connected server also has **Automated messages**, described in [Automated messages](#automated-messages) below.

A Discord server can be connected to one AI Agent at a time. If you see **"This Discord server is already connected to another AI Agent,"** remove it from that Agent first, or choose a different server. When that Agent is on your own account, the message names it, so you know exactly where to remove it.

If Discord connects but does not apply the bot name, use **Apply** on that connected server to retry. If Discord reports a permission problem, click **Add to another server**, choose the same server, and authorize it again. This updates the bot's permissions in place, so you do not need to remove it first.

### When to use your own Discord app

The one-click bot uses the shared **Quickchat AI** application and avatar, but you can give it a different name in every connected server. Set up your own Discord app (see below) when you want:

- A custom bot avatar
- Direct messages
- **Discord AI Actions**. The shared bot does not expose its token as the `{{discord_bot_token}}` System Token that these Actions need, so they require your own app.
- Several bots on one server

The shared bot and your own bot can run side by side. Your own app only takes over a server once you remove the shared bot from that server.

## Use your own Discord app (Advanced setup)

This is the advanced path, and it takes about 10 minutes. In the dashboard, open **External Apps → Discord** and open **Use your own Discord app** through the **Advanced setup** link. You create your own Discord application, add it to your server, and connect it to Quickchat AI with a bot token.

[Watch on YouTube](https://www.youtube.com/watch?v=tNXuqBUZZ-4)

### Create a Discord Server

To initiate the integration process, you'll need a Discord Server. If you don't have a Discord account, visit [discord.com](https://discord.com) and create one. Once logged in, follow [this guide to create your Discord server](https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server-).

### Create a Discord Application

Go to [discord.com/developers/applications](https://discord.com/developers/applications) while logged in to your Discord account and create a new application.

### Configure Your Discord Application

Before adding your bot to the server, enable the **Message Content Intent** for your application. This allows your bot to read messages sent by users on your server.

![Quickchat AI Interface](https://docs.quickchat.ai/_astro/message-intent.NVnNJZhz.png)

### Add the Bot to Your Discord Server

Now you need to add your bot to your server. The way to do it is to construct a Discord URL and paste it into your browser:

```
https://discord.com/api/oauth2/authorize?client_id=<YOUR CLIENT ID>&permissions=309237713920&scope=bot
```

**Where does the permissions number come from?**

The permissions number (`309237713920`) comes from requesting the following permissions:

- `View Channels`
- `Send Messages`
- `Create Public Threads`
- `Send Messages in Threads`
- `Read Message History`

Those are the minimal set of permissions required for your bot to operate correctly. You can see it for yourself by going to [discord.com/developers/applications](https://discord.com/developers/applications), selecting your application, clicking on **Bot** on the left and scrolling down:

![Your discord bot permissions](https://docs.quickchat.ai/_astro/permissions-integer.D-K4GVRL.png)

**Where to find YOUR CLIENT ID?**

The easiest way will be to look at the address bar in your browser and copy the long number which is part of the address:

```
https://discord.com/developers/applications/<YOUR CLIENT ID>/bot
```

![Your client ID](https://docs.quickchat.ai/_astro/client-id.Z-Mljq23.png)

In this case the client id is **1234567890123456789** which means that the full URL you need to go to to add the server will be:

```
https://discord.com/api/oauth2/authorize?client_id=1234567890123456789&permissions=309237713920&scope=bot
```

### Connect Your Own Bot to Quickchat AI

To connect your bot with **Quickchat AI**, retrieve your **Discord Bot Token** from the [Developer Portal](https://discord.com/developers/applications).

1. Go to **Bot Settings** → **Reset Token** → **Copy Token**

![Reset token](https://docs.quickchat.ai/_astro/reset-token.OEKpvVuf.png)

2. In the **Quickchat AI Dashboard**, open **External Apps → Discord**, choose **Use your own Discord app** through **Advanced setup**, and paste your token. Quickchat AI turns the bot on and reports its status as it starts up.

One Discord app can be connected to only one AI Agent at a time. If you see **"This Discord app is already connected to another AI Agent."**, disconnect it from that Agent before connecting it here.

![Paste token](https://docs.quickchat.ai/_astro/paste-token.DZYg0uHJ.png)

### Your AI Bot is Live!

Head back to **Discord** - your bot should be **online** and ready to chat! Just **@mention** it to start a conversation. 🤖💬

![Bot active](https://docs.quickchat.ai/_astro/bot-active.CoUvIYHf.png)

By default, when **@mentioned** the bot replies in the same channel. You can change this with the **Reply mode** setting in the integration: **Reply in channel** (the default) or **Reply in threads**. With **Reply in threads**, the bot answers inside a thread and users can continue the conversation there without mentioning it again.

![Conversation in thread](https://docs.quickchat.ai/_astro/conversation-in-thread.DrEOnyKG.png)

## Automated messages

**Automated messages** post a fixed, editable message after a Discord event. They do not call the AI Agent and do not use conversation credits, and every rule is off until you turn it on. They work on both setups:

- **One-click**: under **Connected servers**, select **Automated messages** on the server you want.
- **Your own Discord app**: open **Advanced setup**, find **Automated messages**, then select **Configure** on the server you want. Your bot must already be in the server for it to appear.

![The three automated message rules for a connected Discord server](https://docs.quickchat.ai/_astro/automated-messages-list.DU9XYUv_.png)

Three rules are available, each with its own switch:

- **New member joins**: pick a **Welcome channel** where the bot greets each new member. Other bots joining the server are ignored.
- **New thread or forum post**: pick a **Parent channel** (text, announcement, forum, or media). The bot posts inside each new public thread under it, and ignores private threads.
- **New channel**: the bot posts in every new text channel. To narrow it, change **Any category** to **Only in this category**. Pairing it with a ticket bot's **Active Tickets** category is the common setup.

Select a rule to open it. Turning on a rule that has no destination yet opens it too, so you can choose one.

Inside a rule, edit the **Message template** and pick a **Delay**: **No delay**, or 2, 5, 10, or 30 seconds. The default 2-second delay lets a ticket or onboarding bot post first. Select any placeholder to insert it where the cursor is:

- `{display_name}`: the member's server nickname, then global display name, then username.
- `{username}`: a backward-compatible alias for `{display_name}`, kept so existing templates continue to greet people the same way. Use `{display_name}` in new templates.
- `{user_handle}`: the member's raw Discord username, such as `marta.nebula`.
- `{user_mention}`: a mention that notifies the member.
- `{user_id}`: the member's numeric Discord user ID.
- `{bot_name}`: the bot's display name on the server.
- `{server_name}`: the server name.
- `{channel_name}`: the channel name.

In a channel opened by another bot, the person is inferred from a single member-specific **View Channel** permission when possible. If the requester is ambiguous, `{display_name}`, `{username}`, `{user_handle}`, and `{user_mention}` become `there`, the mention notifies nobody, and `{user_id}` is empty. Write the message so it reads naturally in either case.

Each rule saves on its own. **Save** stores that rule and returns you to the list, and the switches on the list save the moment you flip one. Leaving a rule any other way discards the edits you made in it.

For the one-click bot, a saved change applies immediately. A bot connected through **Advanced setup** refreshes these rules within about one minute. Changing **New member joins** can also restart that bot to update **Server Members Intent**.

The bot must be able to view and send messages in every selected destination. If a category or channel is later deleted in Discord, saving the rule that points at it tells you which selection is gone; your other rules keep saving normally.

### Server Members Intent

**New member joins** is the only rule that needs anything from the Discord Developer Portal, and only if you use your own Discord app. Discord treats "who joined this server" as a privileged intent that is off by default, so without it your bot never sees a member arrive.

Quickchat AI checks this for you. When you open the rule, it tells you if the intent is off and says nothing once it is on. To enable it, open your application in the [Developer Portal](https://discord.com/developers/applications), go to **Bot → Privileged Gateway Intents**, turn on **Server Members Intent**, save, then save the rule again in Quickchat AI. Your bot keeps replying normally throughout; only this one rule waits.

If your own bot is in more than 100 servers, Discord requires your application to be verified before it will grant the intent.

The other two rules need nothing extra, and the one-click bot needs nothing at all: the shared **Quickchat AI** application already has the intent enabled.

## Discord AI Actions

With your own Discord app connected, open **Actions & MCPs**, click **+ Add Action**, and choose **Discord Action**. The gallery installs complete support and moderation Actions:

- **Support & Tickets**: select a server and text channel, then optionally select a mentionable support role. One installation creates three editable Actions that open a private thread, add the requester, and optionally notify support.
- **Moderation**: timeout, kick, ban, unban, assign role, set slowmode, and send announcement. Each template creates one editable Action.

Quickchat fills in each Action's method, URL, headers, body, parameters, description, response handling, and **Run only when** conditions on the backend. The resulting Actions use the normal editor and remain fully editable.

Every moderation template starts with `author_is_admin is true`. Discord supplies this value for the current message author, and Quickchat checks it before calling the Action. Public chat and API metadata cannot set it. Keep this condition unless you have designed another trusted authorization gate. The templates do not add confirmation messages, replay protection, retry handling, or a separate permission and role-hierarchy policy. Discord still checks the bot's own permissions and role position.

:::caution
Discord Actions need the bot token from **Advanced setup** with your own Discord app. The shared one-click bot alone cannot supply it. Test moderation Actions in the Discord server with both an administrator and a non-administrator account; AI Preview does not supply an authorized Discord sender.
:::

Support Ticket uses **Save to memory** and **Run only when** instead of a special workflow runtime. The first Action saves Discord's returned thread ID as `discord_ticket_thread_id`. The next two read that value to add the requester and post the notification. Describe the same order in the Agent's main prompt. If a result is uncertain, inspect Discord and the Action log before retrying. The saved thread ID is not cleared automatically, so the starter supports one ticket per Quickchat conversation. Start a new Discord conversation or thread for another ticket, or edit the Actions to add the memory lifecycle you need.

For Support Ticket, grant the bot **View Channels**, **Send Messages**, **Read Message History**, **Create Private Threads**, **Send Messages in Threads**, and **Manage Threads** in the selected ticket channel. Role notification is optional. If you select a support role, make it mentionable and give its members access to private threads. If no mentionable roles are available, tickets still open normally without notifying a role. The picker lists text channels and mentionable roles, but it does not verify all channel permission overrides.

See [Actions](/ai-agent/actions/#discord-actions) for the generated configuration and MVP limitations.

## Troubleshooting

If Quickchat AI reports an error on the Discord integration page, it links straight here to the matching section below.

### One-click connect

The one-click flow rarely errors. If the connection does not complete:

- **"This Discord server is already connected to another AI Agent"**: the server is mapped to a different Agent. Remove it from that Agent first, or choose a different server. When that Agent is on your own account, the message names it.
- **"That Discord link has already been used"**: each authorization link works once, so going back or reloading after Discord returns you lands here. Nothing was connected. Click **Add to your Discord server** on this page to start again.
- **"You do not have permission to connect Discord for this AI Agent"**: connecting a channel is an editor action. Ask an admin or editor on the account to connect it, and make sure you have the **Manage Server** permission on the Discord server you picked.
- **"Discord authorization was cancelled"**: you closed Discord's authorize screen before finishing. Nothing was connected, so click **Add to your Discord server** and try again.

### The bot is in my server but never replies

Almost always this means nobody has addressed it yet. The bot answers @mentions, replies to its own messages, and messages inside threads it created, and ignores everything else. The one-click bot also answers `/ask`. @mention it and see whether it responds.

If it still does not reply, check that its role and the channel's permission overrides allow **View Channel**, **Send Messages** and **Read Message History** in that specific channel.

If it replied before and has now gone quiet, check whether the AI message allowance for the month has run out.

### `/ask` does not appear when I type `/`

Discord can take up to an hour to distribute commands to every client after a bot joins. Restarting your Discord client usually surfaces it sooner. In the meantime, @mention the bot instead.

### Both bots are in the same server

If you connect your own Discord app while the shared **Quickchat AI** bot is still in the same server, the shared bot keeps answering there and your own bot stays silent. Both bots can sit in one server, but only one of them replies, and the shared bot takes precedence.

**External Apps → Discord** flags this on both setups. To hand a server to your own bot, remove that server from **Connected servers** in the one-click setup. Your own bot takes over straight away, and nothing about its token or intents needs to change.

Running both on purpose is supported: keep the shared bot in the servers you want it to answer in, and let your own bot serve the rest.

The sections below apply to the **Use your own Discord app** path.

### Message Content Intent

**PrivilegedIntentsRequired**: your bot connected, but its **Message Content Intent** is off, so it cannot read messages. In the [Developer Portal](https://discord.com/developers/applications), open your application, go to **Bot → Privileged Gateway Intents**, turn on **Message Content Intent**, and save. The bot restarts automatically, so allow about a minute.

![Enable Message Content Intent](https://docs.quickchat.ai/_astro/message-intent.NVnNJZhz.png)

### Invalid bot token

**InvalidToken**: the token Quickchat AI has is wrong or was regenerated. A bot token is shown only once, and resetting it invalidates the old one. In the [Developer Portal](https://discord.com/developers/applications), open your application, go to **Bot**, click **Reset Token**, copy the new token, then click **Reconnect** in Quickchat AI and paste it.

![Reset your bot token](https://docs.quickchat.ai/_astro/reset-token.OEKpvVuf.png)

### Require OAuth2 Code Grant

If you see **"Integration requires code grant"** when adding the bot, your application has **Require OAuth2 Code Grant** enabled, which blocks the simple bot invite flow. In the [Developer Portal](https://discord.com/developers/applications), open your application, go to **Bot**, turn **Require OAuth2 Code Grant** off, save, and open the invite URL again.

### The authorization page shows a cake or "baked" message

That quirky screen is Discord's success page: the bot was added. To confirm, open your server's **Server Settings → Integrations → Bots and Apps** and look for your bot in the list.

### Bot not responding after setup

The bot restarts whenever you change its token or settings, so give it up to a minute after saving. If it still does not come online or reply:

1. In the Quickchat AI dashboard, open **External Apps → Discord** and check the connection status. An invalid token or a missing intent is reported there, with a link to the exact fix.
2. Confirm **Message Content Intent** is on (see above) and the token is current (use **Reset Token** if in doubt).
3. @mention the bot in a channel it can access, and verify its role and channel permissions include **Send Messages**, **Create Public Threads**, **Send Messages in Threads**, and **Read Message History**.
4. Choose whether it answers in the channel or in a thread with the **Reply mode** setting under **External Apps → Discord**.

:::tip
The Discord integration page in the Quickchat AI dashboard shows your **Connected servers** for the one-click bot and, under **Advanced setup**, your own app's **Bot Token** field, a **Reply mode** selector (**Reply in channel** or **Reply in threads**), and a link to join our Discord community for help.
:::

---

Join our Discord server to learn more about how to make the most of Quickchat AI 👉 [discord.gg/KqkHwvPRNH](https://discord.gg/KqkHwvPRNH)
