How to Connect OpenClaw to Discord?
Discord integration lets your OpenClaw agent join servers, respond in channels, and handle DMs. It's great for team and community use cases.
Create a Discord application at discord.com/developers. Add a Bot to the application and copy the bot token. Then invite the bot to your server using the OAuth2 URL generator (select bot scope with Send Messages and Read Message History permissions).
Pair the bot with OpenClaw using the pair command. The agent starts listening for messages in channels where it has access.
Discord-specific features: - Channel-specific behavior: Configure which channels the bot responds in - Thread support: Bot can respond in threads for organized conversations - Slash commands: Register custom /commands for common actions - Embeds: Rich formatted responses with colors and thumbnails - Role-based access: Restrict who can interact with the bot
Discord uses websockets for real-time communication, so the bot responds instantly. The integration handles rate limiting automatically to avoid Discord API restrictions.
For server moderation, the bot can be configured to monitor channels, flag content, and automate administrative tasks using OpenClaw skills.
Tip: Set up the bot in a dedicated channel first. Once working, expand access to other channels as needed.
openclaw pair discord # Enter your Discord bot token when prompted