All guides

How to Create a Discord Bot Token for OpenClaw

You need a Discord bot token to deploy an OpenClaw assistant on Discord. This guide walks through the full process — creating an application, adding a bot, getting the token, and inviting it to your server.

If you want the full Discord bot hosting overview before setup, see OpenClaw Discord Bot Hosting.

OpenClaw Discord Bot Token (Support Term)

If you searched for openclaw discord bot token, this page is the canonical setup flow. After token setup, use How to Configure OpenClaw Group Chat Behavior for group controls, How to Change the OpenClaw DM Policy to control who can DM your bot, and How to Unlock DM Access on Your OpenClaw Bot for dmPolicy / allowlist recovery.

Step 1: Create a Discord application

Go to the Discord Developer Portal and sign in with your Discord account.

Click "New Application" in the top right. Give it a name (this is internal — your bot's display name is set separately). Click Create.

Discord Developer Portal with New Application button and name dialog

Step 2: Add a bot

In your new application, click "Bot" in the left sidebar.

Discord Developer Portal Bot page with Reset Token button

Click "Reset Token" to generate a bot token. Discord will show the token once — copy it now.

Discord Developer Portal Bot page with revealed token

MTE5MDg3NjQ0NjY4NTk2NTQwMA.GBjPJt.example_token_here

Save this token somewhere safe. You'll paste it into the ClawCloud deploy wizard.

Step 3: Configure bot permissions

While you're on the Bot page, scroll down to "Privileged Gateway Intents" and enable:

  • Message Content Intent — Required so the bot can read and respond to messages.

Click Save Changes.

Discord Bot settings with Message Content Intent toggle enabled

Step 4: Invite the bot to your server

Go to "OAuth2" in the left sidebar, then click "URL Generator".

Under Scopes, select:

  • bot

Under Bot Permissions, select:

  • Send Messages
  • Read Message History
  • Embed Links

Bot scope:

Discord OAuth2 URL Generator with bot scope selected

Message permissions:

Discord OAuth2 URL Generator with bot scope and message permissions selected

Generate the URL:

Discord OAuth2 URL Generator showing generated invite URL with copy button

Copy the generated URL at the bottom and open it in your browser. Discord will ask you to authorize the bot.

Complete the authorization flow: select your server, click Continue, review permissions, click Authorise, and confirm the success message.

Discord bot authorization flow showing server selection, permission confirmation, and success message left to right

Step 5: Deploy on ClawCloud

Go to the ClawCloud deploy wizard, Discord will be preselected, and paste the bot token. Your bot will be live in under a minute.

Troubleshooting

Bot is online but not responding — Make sure you enabled the Message Content Intent in Step 3. Without it, the bot can't read messages.

"Bot token invalid" error — Tokens can only be viewed once when generated. If you lost it, go back to the Bot page and click Reset Token to generate a new one.

Bot not appearing in server — Make sure you completed Step 4 and authorized the bot for the correct server. The bot needs to be invited before it can respond.

Deploy Your Discord Bot

Ready to deploy?

Skip the setup — your OpenClaw assistant runs on a dedicated server in under a minute.

Deploy Your OpenClaw