Short answer. In the Discord Developer Portal, create an application, open Bot, press Reset Token to get the token and turn on Message Content Intent. Invite the bot to a server you are in, turn on Developer Mode in Discord and copy your own user ID. Then give OpenClaw the token and allow only your user ID. On PlayNHost that is two fields on the Agent page and a restart; the panel installs OpenClaw's Discord connector for you.
Checked on 6 November 2026, accurate for OpenClaw 2026.11.1.
This guide follows OpenClaw's Discord setup documentation and the PlayNHost panel as it works today.
Open Bot in the sidebar and set the bot's Username to your agent's name.
Still on Bot, under Privileged Gateway Intents, turn on:
Message Content Intent: required here. OpenClaw asks Discord for it, and Discord refuses the connection ("disallowed intents") when it is off.
Server Members Intent: recommended by OpenClaw, needed for role allowlists and matching names to IDs.
Presence Intent: optional, only for presence updates.
Press Reset Token and copy the token. Despite the name, the first press creates your first token. Keep it private.
Step 2: invite the bot and allow DMs
Open OAuth2, then the OAuth2 URL Generator. Tick the scopes bot and applications.commands.
Under Bot Permissions, tick at least View Channels, Send Messages, Read Message History, Embed Links and Attach Files (Add Reactions is optional).
Open the generated URL, pick your server and press Continue. A private server with just you and the bot is the simplest.
Let the bot message you: right-click the server icon, open Privacy Settings and turn on Direct Messages.
Step 3: copy your Discord user ID
In Discord, open User Settings, then Developer, and turn on Developer Mode (on mobile: App Settings, Advanced). Then right-click your own avatar or name and choose Copy User ID. It is a long number (PlayNHost accepts 17 to 20 digits).
OpenClaw's Discord docs use Developer Mode for this, and so does the panel: unlike the Telegram setup, the console does not ask you to read your ID from a bot reply.
Under Chat apps, press Set on Discord bot token, paste the token and press Save. The panel checks its shape; a wrong paste gets "That is not a valid discord bot token."
Under Who can message it, enter your ID in Discord user IDs and press Save. Several IDs go on one line, separated by commas.
Press Start, or Restart now if the agent is already running. Discord is a separate OpenClaw plugin, so the first start with a Discord token installs it once. Among the other lines, the console shows:
[PlayNHost] Installing the Discord connector 2026.11.1
[PlayNHost] Starting OpenClaw 2026.11.1
[PlayNHost] Your agent is running
[PlayNHost] Discord: only user 123456789012345678 can message your agent.
In our test the connector install took about 30 seconds. Later starts reuse it, and update it when OpenClaw itself is updated.
Send your bot a direct message in Discord. Your agent answers. Other Discord accounts are ignored.
If you leave Discord user IDs empty, the console says "Discord: nobody can message your agent yet" and explains how to copy your ID. Until you add it, anyone who DMs the bot is ignored; OpenClaw answers a first message with a pairing code: ignore it, nothing needs approving, and put your user ID on the Agent page instead.
What PlayNHost sets for you
Discord DMs use dmPolicy: "allowlist" with the IDs from the Agent page (or pairing while the list is empty), and those IDs become OpenClaw's command owners.
Server channels stay closed: OpenClaw's default groupPolicy is allowlist, and no server is on that list until one is added to OpenClaw's settings. Use direct messages.
The token reaches OpenClaw as DISCORD_BOT_TOKEN in its environment. A token written in OpenClaw's settings file would win over it, so the start removes that one.
The commands part makes you the owner for owner-only commands, which a hand-written allowlist does not do. For a service install, put DISCORD_BOT_TOKEN in ~/.openclaw/.env so the service has it, and restart the service instead of running openclaw gateway.
Or keep the default pairing mode: DM the bot, then approve the code within an hour:
openclaw pairing list discord
openclaw pairing approve discord <CODE>
When it does not answer
What you see
Cause and fix
"Used disallowed intents" in OpenClaw's log
Message Content Intent is off. Turn it on in the Developer Portal, Bot, then restart.
401: Unauthorized from /gateway/bot
The token was reset or mistyped. Press Reset Token again, then Replace on the Agent page and restart. On PlayNHost, OpenClaw's log is logs/openclaw.log in Files.
The bot does not answer in a DM
You and the bot should share a server. OpenClaw's Discord guide also asks you to turn on Direct Messages in that server's Privacy Settings so the bot can message you.
The bot replied with a pairing code
Discord user IDs is empty, so the agent is in pairing mode. Copy your user ID (Developer Mode, Copy User ID), put it on the Agent page and restart.
The bot does not answer and sends no code
The ID on the list is not your user ID (for example a server or channel ID). Copy User ID from your own name, replace it and restart.
Console: "The Discord connector could not be installed; your agent starts without Discord."
The plugin download failed. Press Restart to try again.
No answer in a server channel
Server channels are closed by default. Use a direct message.
We use cookies to keep the site working, to understand how it is used, and to measure our marketing. You can accept all, accept essential cookies only, or choose per category.We use cookies to keep the site working, to understand how it is used, and to measure our marketing. They are on by default here. You can switch off anything you do not want.Read our privacy policy