> This page is for v0.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.

# Set Up Discord

> Prepare a Discord bot token, server access, user restriction, and mention behavior for NemoClaw.

Create a Discord bot and choose its server and user access before you enable the channel.

## Prepare Discord Settings

Copy the bot token from the Discord Developer Portal into `DISCORD_BOT_TOKEN`.
For server channels, enable Developer Mode in Discord, right-click the server, and copy the Server ID into `DISCORD_SERVER_ID`.

By default, NemoClaw configures the bot to reply only when mentioned.
If `DISCORD_SERVER_ID` is set and `DISCORD_REQUIRE_MENTION` is unset, NemoClaw defaults `DISCORD_REQUIRE_MENTION` to `1`.

Set `DISCORD_REQUIRE_MENTION=0` if you want the bot to reply to all messages in the configured server.
Set `DISCORD_USER_ID` to restrict access to one user.

Without `DISCORD_USER_ID`, any member of the configured server can message the bot.

NemoClaw routes Discord REST and gateway traffic through the top-level managed proxy and does not write a per-account Discord proxy because OpenClaw accepts only loopback values for that field.

## Enable Discord

Export the settings before onboarding or `channels add discord`:

```bash
export DISCORD_BOT_TOKEN="<your-discord-bot-token>"
export DISCORD_SERVER_ID="<your-discord-server-id>"
export DISCORD_REQUIRE_MENTION=1
```

Replace `<your-discord-bot-token>` with the real token before you run onboarding or add the channel.
NemoClaw rejects the literal placeholder and does not save it or configure Discord.

During initial onboarding enrollment and `channels add discord`, NemoClaw verifies the token with Discord before activating the channel.
If Discord rejects a new enrollment token, NemoClaw leaves Discord inactive and prints a credential warning.
Other onboarding work can continue.
If verification times out, is rate-limited, or cannot reach Discord, NemoClaw also skips the new enrollment.
Failed `channels add discord` verification does not change an existing provider or active channel.
The message that a token is available from the environment or credential store confirms input availability only.

When replacing an active Discord credential through onboarding, failed or inconclusive verification stops rotation before recreation and preserves the existing sandbox.
Refer to [Rotate a Messaging Credential](../../security/credential-rotation#rotate-a-messaging-credential) for replacement and retry steps.

Continue with [Enable Channels During Onboarding](enable-channels-during-onboarding) or [Add Channels After Onboarding](add-channels-after-onboarding).
If the bot logs in but delivery fails, refer to [Discord bot logs in, but the channel still does not work](../../reference/troubleshooting#discord-bot-logs-in-but-the-channel-still-does-not-work).

## Retry Authentication

If Discord rejects the token, replace `DISCORD_BOT_TOKEN` with a bot token from the Discord Developer Portal.
If verification is inconclusive, check host access to `discord.com` and wait before retrying a rate-limited request.
Retry enrollment for your sandbox:

```bash
nemoclaw <name> channels add discord
```