Module 03 — Communicate with Discord (or Telegram)
🎮 The Cricut Analogy: Download the Software
You bought a Cricut cutting machine, but you can't use it until you install Design Space. Discord is your Design Space. It's the persistent interface where conversations live, even when you close the browser tab.
✨ New: Agent-Led Setup (March 2026)
Your agent can now set up Discord for you automatically. Just tell it:
"Connect me to Discord"
It'll walk you through creating a bot token and wire everything up itself. No manual config edits needed.
What Discord Does (That the Web Chat Doesn't)
- Persistent conversations: Close your browser, come back tomorrow, history is still there
- Multiple channels: Separate spaces for different topics or projects
- Rich media: Images, files, code snippets display properly
- Any device: Phone, tablet, laptop — all sync
- Notifications: Agent can ping you when something needs attention
The Setup (Two Ways)
Option A: Let Your Agent Do It (Recommended)
Simply say to your agent in web chat:
"Connect me to Discord"
Your agent will:
- Ask you to create a Discord account (if you don't have one)
- Guide you through creating a Discord server
- Walk you through creating a bot in the Discord Developer Portal
- Ask for your bot token and connect it automatically
🔑 Critical Step: Enable Channel Replies
After your agent connects, tell it this exact phrase:
"Set Discord groupPolicy to open"
This is the #1 issue users face. Without this, your bot sits silent in channels and won't respond to any messages.
🔗 What About That Pairing Code?
When you first message your bot, it will reply with a code like ABC123. This is how OpenClaw verifies it's really you.
Just copy the code and tell your agent:
"Approve Discord pairing code: ABC123"
This only happens once.
Option B: Do It Yourself
If you prefer to understand the full process, here's what your agent does behind the scenes:
1
Create Your Discord Account
- Go to discord.com
- Click "Sign Up" or "Open Discord in Browser"
- Enter your email, create a username, set a password
- Verify your email (check inbox for confirmation link)
2
Create Your Discord Server
- In Discord, click the "+" button in the left sidebar
- Click "Create My Own"
- Select "For me and my friends"
- Name it (e.g., "My Agent", "Heyron Workspace")
- Click "Create"
3
Enable Server DMs (Required)
- Right-click your server icon in the left sidebar
- Click "Privacy Settings"
- Toggle ON "Allow direct messages from server members"
This lets your bot send you the pairing code. You can disable this later after setup is complete.
4
Create Your Bot
- Go to discord.com/developers/applications
- Click "New Application" (top right)
- Name your bot (e.g., "MyAssistant") and click "Create"
- Click "Bot" in the sidebar
- Click "Add Bot" → confirm
- Click "Reset Token" and COPY THE TOKEN
⚠️ Copy the token immediately — you can't see it again without resetting.
🔐 Security Option: Pass Token Without Chat
If your agent (or you) doesn't want to paste a token in chat, here's a secure alternative (only works if you have direct edit access to your workspace files):
- Tell your agent: "Create a file called discord.env in my workspace"
- Open the file in the file browser UI
- Paste your bot token there (format:
DISCORD_BOT_TOKEN=your_token_here)
- Press Ctrl+S (or Cmd+S) to save
- Tell your agent: "Read my discord.env file and connect to Discord"
Your agent will read the file, connect, and the token stays stored securely in your workspace.
5
Enable Required Settings
- In Developer Portal, scroll to "Privileged Gateway Intents"
- Turn ON these three:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Click "Save Changes"
6
Invite Bot to Your Server
- In Developer Portal, go to "OAuth2" → "URL Generator"
- Under "Scopes", check "bot"
- Under "Bot Permissions", check:
- Send Messages
- Read Message History
- Attach Files
- Embed Links
- Add Reactions
- Copy the generated URL, paste in browser, select your server, authorize
7
Give Token to Your Agent
Tell your agent (choose one method):
Method 1 (direct): "Connect to Discord. My bot token is: [paste token here]"
Method 2 (secure file): "Read my discord.env file and connect to Discord"
Your agent will validate the token, connect, and confirm it's working.
8
Enable Channel Replies (Critical!)
Tell your agent this exact phrase:
"Set Discord groupPolicy to open"
This is the #1 issue users face. Without this, your bot sits silent in channels and won't respond to any messages.
9
Approve Pairing Code
When you first DM your bot, it will reply with a code like ABC123. This is how OpenClaw verifies it's really you.
Copy the code and tell your agent:
"Approve Discord pairing code: [paste code here]"
Done! Your bot is now fully connected.
What You Can Do Now
With Discord connected:
- ✅ Close your browser — conversation history persists
- ✅ Send images and files easily
- ✅ Create multiple channels for different projects
- ✅ Access from phone, tablet, or any computer
- ✅ Agent can notify you when tasks complete
Quick Tips
- DM vs Server: DM your bot directly for private conversations
- Channels: Create new channels for topics (#project-alpha, #research)
- Mentions: Type
@YourBotName to make sure it notices