Discord
Deploy an OpenWalrus agent as a Discord bot — setup, configuration, and channel binding.
OpenWalrus can run agents as Discord bots, bound to a specific guild and channel.
Setup
1. Create a bot
- Go to the Discord Developer Portal
- Create a new application
- Go to Bot settings and create a bot
- Copy the bot token
- Enable the Message Content Intent under Privileged Gateway Intents
- Invite the bot to your server with appropriate permissions
2. Get IDs
Enable Developer Mode in Discord (Settings → Advanced → Developer Mode). Right-click your server to copy the Guild ID, and right-click the channel to copy the Channel ID.
3. Configure
Add the credentials to walrus.toml:
[channel.discord]
token = "your-bot-token"
guild_id = "123456789"
channel_id = "987654321"4. Start the daemon
walrus daemonThe Discord bot connects and listens in the specified channel.
Message flow
- User sends a message in the bound Discord channel
- The serenity adapter converts it to a
DaemonEvent::Message - The event loop dispatches it to the target agent
- Agent responses are posted back to the channel
What's next
- Telegram — set up a Telegram bot
- Event loop — how messages flow through the system
- Configuration — full config reference