Skip to main content
Connecting Discord to your Suji instance lets your OpenClaw bot join a Discord server and respond to messages. Once connected, your bot will appear as a member of the server and can read and reply to messages in any channel it has access to.

What You’ll Need

Before you start, make sure you have:
  • A Discord account
  • A Discord server where you have Administrator or Manage Server permission (you need this to invite the bot)
  • A running Suji instance (see Create Your First Instance if you haven’t set one up yet)
If you don’t have a Discord server yet, you can create one for free. Open Discord, click the + button in the left sidebar, and choose Create My Own.

Create a Discord Application

Discord bots are managed through the Discord Developer Portal. You’ll create an “application,” add a bot to it, configure its permissions, and then invite it to your server.
1

Open the Developer Portal

Go to discord.com/developers/applications and log in with your Discord account.If this is your first time here, you’ll see an empty applications list. This is where all your bot applications will be managed.
2

Create a new application

Click the New Application button in the top-right corner. Enter a name for your application (for example, Acme Support Bot) and click Create.This name is what users will see as the bot’s display name in your server. You can change it later.
The application name and the bot’s display name are different things. The application name is what you see in the Developer Portal. The bot’s display name (which users see in Discord) can be customized separately under the Bot settings.
3

Set up the bot

In the left sidebar, click Bot. This page is where you configure your bot’s settings.You’ll see your bot’s username and an option to change its avatar. The bot is created automatically when you create the application — you don’t need to click “Add Bot” separately.
4

Copy the bot token

On the Bot page, find the Token section and click Reset Token. Discord will ask you to confirm — click Yes, do it!.Discord will display your bot token. It looks something like this:
MTIzNDU2Nzg5MDEyMzQ1Njc4.GAbCdE.abcdefghijklmnopqrstuvwxyz1234567890
Copy this token immediately. Discord only shows it once — if you navigate away without copying it, you’ll need to reset it again.
Keep your bot token secret. Anyone with this token can control your bot. Never share it publicly, commit it to a code repository, or post it in a Discord channel. If your token is ever exposed, reset it immediately on this page.
5

Enable Privileged Gateway Intents

Still on the Bot page, scroll down to the Privileged Gateway Intents section. You’ll see three toggles:
  • Presence Intent — Lets the bot see when users are online/offline. Not required for Suji.
  • Server Members Intent — Lets the bot see the member list and receive events when members join or leave. Optional — only enable this if your OpenClaw agent needs to know about server members.
  • Message Content Intent — Lets the bot read the content of messages. Required for Suji.
You must enable Message Content Intent. Without it, your bot will receive message events but the message content will be empty, so your OpenClaw agent won’t be able to read or respond to what users say.Toggle on Message Content Intent (and optionally Server Members Intent), then click Save Changes at the bottom of the page.
If you skip this step, your bot will appear online in Discord but won’t respond to any messages. This is the most common setup mistake.
6

Generate an invite URL

In the left sidebar, click OAuth2. On this page, find the OAuth2 URL Generator section.First, under Scopes, check the box for:
  • bot — This tells Discord your application needs a bot user in the server
After selecting the bot scope, a Bot Permissions panel will appear below. Select the following permissions:
  • Read Messages/View Channels — Lets the bot see channels and read messages
  • Send Messages — Lets the bot send messages in channels
  • Read Message History — Lets the bot read older messages in channels
You can add more permissions later if your use case requires them (such as Embed Links, Attach Files, or Add Reactions). Start with the basics and adjust as needed.
At the bottom of the page, Discord generates an invite URL. Click Copy to copy it.
7

Invite the bot to your server

Open the URL you just copied in your browser. Discord will show you an authorization screen:
  1. Select the server you want to add the bot to from the Add to Server dropdown. Only servers where you have Administrator or Manage Server permission will appear in this list.
  2. Review the permissions listed and click Authorize.
  3. Complete the CAPTCHA if prompted.
After authorizing, the bot will appear in your server’s member list. It will show as offline until you connect it to Suji in the next step.
If you don’t see your server in the dropdown, make sure you’re logged into the correct Discord account and that you have admin permissions on the server.

Connect to Suji

Now that your Discord bot is set up and invited to your server, connect it to your Suji instance.
1

Go to your instance

Open the Suji dashboard and navigate to the instance you want to connect. Click the Connectors tab.
2

Add a Discord connector

Click Add Connector and select Discord from the list.
3

Enter the bot token

Paste the bot token you copied from the Developer Portal into the token field. Make sure there are no extra spaces before or after the token.
4

Save

Click Save. The connector status should change to Connected within a few seconds, and your bot will appear as online in your Discord server.

Verify the Connection

Once the connector shows Connected and your bot appears online in Discord:
  1. Go to any text channel in your Discord server where the bot has access
  2. Send a message — your OpenClaw agent should reply
If the bot replies, everything is working. The bot will now respond to all messages it can see in the server.
If this is a new instance, make sure you’ve configured your OpenClaw agent with a system prompt and any necessary settings before testing the connection. An unconfigured agent may not respond as expected.

Troubleshooting

This is almost always caused by the Message Content Intent not being enabled. Without it, the bot receives message events but can’t read the actual text.To fix this:
  1. Go to discord.com/developers/applications
  2. Select your application
  3. Click Bot in the left sidebar
  4. Scroll to Privileged Gateway Intents
  5. Make sure Message Content Intent is toggled on
  6. Click Save Changes
After enabling the intent, you may need to restart the connector. Delete it in the Suji dashboard and re-add it with the same token.If intents are already enabled, also check:
  • The instance is in a Running state in the Suji dashboard
  • The bot has Send Messages and Read Messages/View Channels permissions in the channel
  • The instance logs in the Suji dashboard don’t show any errors
If the bot shows as offline in your Discord server’s member list:
  • Check the connector status — Open the Connectors tab in the Suji dashboard. If the status is not Connected, the bot token may be invalid.
  • Verify the token — The most common cause is an incorrect or expired token. Go to the Developer Portal, reset the token, and update the connector in Suji with the new token.
  • Check the instance state — The instance must be in a Running state for the bot to go online. If the instance is stopped or in an error state, start it first.
  • Re-add the connector — Delete the connector in Suji and create a new one with a fresh token from the Developer Portal.
If the bot is online but gets permission errors or can’t send messages in certain channels:
  • Re-invite the bot — Generate a new OAuth2 URL in the Developer Portal with the correct permissions (Read Messages/View Channels, Send Messages, Read Message History) and use it to update the bot’s permissions. You don’t need to kick the bot first — re-authorizing will update its permissions.
  • Check server-level role permissions — In your Discord server, go to Server Settings > Roles. Find the bot’s role (usually named after the bot) and make sure it has the necessary permissions enabled.
  • Check channel-level overrides — Individual channels can override role permissions. Right-click the channel, go to Edit Channel > Permissions, and make sure the bot’s role isn’t denied access.
Discord lets server admins restrict which channels a bot can access. If your bot responds in some channels but not others:
  1. Right-click the channel where the bot isn’t working
  2. Click Edit Channel
  3. Go to the Permissions tab
  4. Check if the bot’s role has been explicitly denied View Channel or Read Messages permission
  5. Either remove the deny override or explicitly grant the bot access
Also check if the channel is in a category with restricted permissions. Category-level permission overrides apply to all channels within that category unless the channel has its own overrides.
An easy way to test is to check if the bot appears in the member list on the right side of the channel. If you don’t see the bot listed there, it doesn’t have access to that channel.
Discord enforces rate limits on bots to prevent abuse. If your bot is sending too many messages too quickly, Discord will temporarily throttle it, causing delayed or failed responses.Signs of rate limiting:
  • Responses are significantly slower than usual
  • Some messages get replies while others don’t
  • The instance logs show HTTP 429 errors
To reduce rate limiting:
  • Avoid high-traffic channels — If the bot is in a channel with many active users, every message triggers the bot, which can hit rate limits quickly.
  • Limit the bot’s channel access — Restrict the bot to only the channels where you actually need it by adjusting channel permissions.
  • Check your OpenClaw agent configuration — If the agent sends multiple messages per response, each one counts against the rate limit. Simplify responses where possible.
Discord’s rate limits reset automatically after a short cooldown period (usually a few seconds to a minute). No manual action is needed — the bot will resume normal operation once the limit resets.