OpenClaw
Productivity & CommsRecommended

Discord Skill for OpenClaw

Interact with Discord servers and channels.

Last updated: 2026-03-09

Quick Install

$ npx clawhub@latest install discord

Key Features

Send, edit, and delete messages across channels and DMs
Create and manage threads, pins, and polls
Upload custom emojis and stickers to servers
Read messages and search channel history
Check member info, roles, and channel permissions
Optional moderation actions — timeout, kick, and ban with safeguards

OpenClaw Discord Skill Overview

The Discord skill connects OpenClaw to your Discord servers via the Discord API, turning your AI agent into a powerful Discord assistant. Once installed, you can send messages, manage threads, run polls, upload emojis, and even handle moderation — all through natural language commands.

Discord is one of the most popular platforms for developer communities, open-source projects, and team communication. The OpenClaw Discord skill eliminates the need to context-switch between your terminal and Discord. Whether you are monitoring community channels, responding to questions, or managing server settings, a simple conversation with OpenClaw gets the job done.

Typical workflow:

  1. Ask OpenClaw to send a message or check recent activity in a Discord channel.
  2. The agent calls the Discord API with the appropriate action (e.g., sendMessage, readMessages).
  3. Results are returned in a readable summary — no context-switching required.

Prerequisites for Discord Skill

Before installing the Discord skill, make sure you have:

  • OpenClaw installed and running (v1.0+)
  • A Discord account with access to the servers you want to manage
  • A Discord bot created in the Developer Portal with a bot token
  • The bot invited to your server with the necessary permissions
  • clawhub CLI installed for skill management

Verify your setup:

bash
# Check OpenClaw version
openclaw --version

# Check clawhub CLI
clawhub --version

Creating a Discord Bot

If you do not have a bot yet, follow these steps:

  1. Go to the Discord Developer Portal and click New Application.
  2. Navigate to the Bot tab and click Add Bot.
  3. Copy the bot token — you will need this for configuration.
  4. Under Privileged Gateway Intents, enable Message Content Intent if you need the skill to read message content.
  5. Use the OAuth2 URL Generator to create an invite link with bot scope and the permissions you need.

How to Install the Discord Skill

Install the Discord skill with a single command:

bash
npx clawhub@latest install discord

To verify the installation:

bash
clawhub list

You should see discord in the list of installed skills. You can also preview the skill before installing with clawhub inspect discord.

Discord Skill Configuration

The Discord skill requires a bot token for authentication. Create a bot in the Discord Developer Portal if you have not already.

Environment Setup

bash
# Set your Discord bot token
export DISCORD_BOT_TOKEN=your_bot_token_here

Important: Never hardcode tokens in configuration files. Use environment variables or a secret manager such as 1Password.

Gateway Intents

The skill uses Discord Gateway Intents to receive events. Three intents are privileged and must be enabled in the Developer Portal:

| Intent | Purpose | Required? | |--------|---------|-----------| | MESSAGE_CONTENT | Read message text, embeds, and attachments | Yes, for readMessages | | GUILD_MEMBERS | Access member join/leave events and member lists | Only if using memberInfo | | GUILD_PRESENCES | Track user online/offline status | Rarely needed |

Enable only the intents your use case requires. For most setups, MESSAGE_CONTENT alone is sufficient.

Action Gating

The Discord skill supports fine-grained action control. Most actions are enabled by default, but sensitive actions are disabled:

| Action | Default | Description | |--------|---------|-------------| | discord.actions.moderation | false | Timeout, kick, and ban users | | discord.actions.roles | false | Add or remove roles from members |

To enable moderation actions, update your OpenClaw configuration:

bash
# Enable moderation actions (use with caution)
openclaw config set discord.actions.moderation true

Discord Skill Usage Examples

1. Send a Message to a Channel

You: "Send a message to the #announcements channel saying 'Version 2.0 is now live! Check the release notes for details.'"

The agent uses the sendMessage action with the target channel ID. It posts the message and confirms delivery with the message link.

2. Monitor Community Questions

You: "Read the last 10 messages in #help-forum and summarize any unanswered questions."

The agent calls readMessages on the specified channel, filters for messages without replies, and returns a summary of unanswered questions with links to each thread.

3. Run a Community Poll

You: "Create a poll in #general asking 'What feature should we build next?' with options: Dark mode, Mobile app, API improvements, Better docs. Let it run for 24 hours."

The agent creates a poll using the poll action with up to 10 answer options. It sets the duration and returns a confirmation with the poll link.

4. Upload a Custom Emoji

You: "Upload this image as a custom emoji called 'ship_it' to our server."

The agent uses emojiUpload to add the image (PNG/JPG/GIF, max 256KB) as a server emoji. It confirms the upload and shows the emoji code :ship_it: for use in messages.

Security & Best Practices

The Discord skill can perform write operations on your servers, including sending messages and — if enabled — moderation actions. Follow these guidelines to stay safe:

  • Use least privilege. Only grant the bot permissions it actually needs. Avoid granting Administrator permission unless absolutely necessary.
  • Keep moderation disabled by default. The skill disables moderation and roles actions out of the box. Only enable them if you have a specific need and understand the implications.
  • Enable only required intents. Privileged intents like MESSAGE_CONTENT and GUILD_MEMBERS should only be enabled when your workflow depends on them.
  • Rotate your bot token regularly. If you suspect a token has been compromised, regenerate it immediately in the Developer Portal.
  • Review before confirming. OpenClaw prompts for confirmation on destructive actions. Always read the action summary before approving, especially for moderation and bulk operations.
  • Audit bot activity. Use Discord's Audit Log to track actions performed by your bot and verify they match your expectations.

Troubleshooting Common Errors

"401: Unauthorized"

Your bot token is missing, invalid, or has been regenerated.

  1. Check that DISCORD_BOT_TOKEN is set in your environment.
  2. Verify the token matches the one in your Developer Portal bot settings.
  3. If the token was recently regenerated, update your environment variable.
bash
# Verify the token is set
echo $DISCORD_BOT_TOKEN

"50001: Missing Access"

The bot does not have permission to access the target channel or server.

  1. Confirm the bot has been invited to the server with the correct permissions.
  2. Check channel-level permission overrides that might block the bot.
  3. Use the permissions action to check the bot's effective permissions for a channel.

"MESSAGE_CONTENT intent is required"

You are trying to read message content but the MESSAGE_CONTENT privileged intent is not enabled.

  1. Go to the Developer Portal → your application → Bot tab.
  2. Under Privileged Gateway Intents, enable Message Content Intent.
  3. For verified bots (75+ servers), you must apply for this intent through the portal.

FAQ

Yes, when configured with appropriate safeguards. The skill follows OpenClaw's confirmation model — write actions require your explicit approval. Moderation actions (timeout, kick, ban) are **disabled by default** and must be explicitly enabled. Start with read-only operations and gradually enable write permissions as you gain confidence in the workflow.

Yes. The bot token grants access to all servers the bot has been invited to. You specify the target channel or server in each command, and the agent routes the action accordingly. For security, consider creating separate bots with different permission levels for different servers — one for community management and another for internal team channels.

Both skills enable AI-powered messaging, but they target different platforms and use cases. The [Slack skill](/skills/slack) is optimized for workplace communication with Slack-specific features like Slack Connect and workflows. The Discord skill is built around Discord's community-oriented features — threads, polls, emojis, stickers, and voice channels. If your team uses both platforms, install both skills and let OpenClaw pick the right one based on your request.

Related Skills

Slack
Recommended

Send and read Slack messages, manage channels.

View Guide
Trello
Recommended

Manage Trello boards, lists, and cards.

Linear
Recommended

Manage Linear issues, projects, and cycles.

Install on ClawHubBack to Skills Directory