home / skills / openclaw / openclaw / discord

discord skill

/skills/discord

This skill helps you manage Discord through messages, delivering fast, guided operations in channels with actions and rich UI.

npx playbooks add skill openclaw/openclaw --skill discord

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.4 KB
---
name: discord
description: "Discord ops via the message tool (channel=discord)."
metadata: { "openclaw": { "emoji": "🎮", "requires": { "config": ["channels.discord.token"] } } }
allowed-tools: ["message"]
---

# Discord (Via `message`)

Use the `message` tool. No provider-specific `discord` tool exposed to the agent.

## Musts

- Always: `channel: "discord"`.
- Respect gating: `channels.discord.actions.*` (some default off: `roles`, `moderation`, `presence`, `channels`).
- Prefer explicit ids: `guildId`, `channelId`, `messageId`, `userId`.
- Multi-account: optional `accountId`.

## Guidelines

- Avoid Markdown tables in outbound Discord messages.
- Mention users as `<@USER_ID>`.
- Prefer Discord components v2 (`components`) for rich UI; use legacy `embeds` only when you must.

## Targets

- Send-like actions: `to: "channel:<id>"` or `to: "user:<id>"`.
- Message-specific actions: `channelId: "<id>"` (or `to`) + `messageId: "<id>"`.

## Common Actions (Examples)

Send message:

```json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "hello",
  "silent": true
}
```

Send with media:

```json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "see attachment",
  "media": "file:///tmp/example.png"
}
```

- Optional `silent: true` to suppress Discord notifications.

Send with components v2 (recommended for rich UI):

```json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "components": "[Carbon v2 components]"
}
```

- `components` expects Carbon component instances (Container, TextDisplay, etc.) from JS/TS integrations.
- Do not combine `components` with `embeds` (Discord rejects v2 + embeds).

Legacy embeds (not recommended):

```json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "embeds": [{ "title": "Legacy", "description": "Embeds are legacy." }]
}
```

- `embeds` are ignored when components v2 are present.

React:

```json
{
  "action": "react",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "emoji": "✅"
}
```

Read:

```json
{
  "action": "read",
  "channel": "discord",
  "to": "channel:123",
  "limit": 20
}
```

Edit / delete:

```json
{
  "action": "edit",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "message": "fixed typo"
}
```

```json
{
  "action": "delete",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
```

Poll:

```json
{
  "action": "poll",
  "channel": "discord",
  "to": "channel:123",
  "pollQuestion": "Lunch?",
  "pollOption": ["Pizza", "Sushi", "Salad"],
  "pollMulti": false,
  "pollDurationHours": 24
}
```

Pins:

```json
{
  "action": "pin",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
```

Threads:

```json
{
  "action": "thread-create",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "threadName": "bug triage"
}
```

Search:

```json
{
  "action": "search",
  "channel": "discord",
  "guildId": "999",
  "query": "release notes",
  "channelIds": ["123", "456"],
  "limit": 10
}
```

Presence (often gated):

```json
{
  "action": "set-presence",
  "channel": "discord",
  "activityType": "playing",
  "activityName": "with fire",
  "status": "online"
}
```

## Writing Style (Discord)

- Short, conversational, low ceremony.
- No markdown tables.
- Mention users as `<@USER_ID>`.

Overview

This skill provides Discord operations via the message tool, letting the assistant send, read, edit, react, pin, search, and manage threads and polls on Discord. It always uses channel: "discord" and supports multi-account usage and explicit ids for guilds, channels, messages, and users. The design favors Discord components v2 for rich UI and respects gated actions like roles, moderation, presence, and channels.

How this skill works

Actions are issued as structured JSON messages to the message tool with channel: "discord". Use explicit targets like to: "channel:<id>" or to: "user:<id>", and include guildId, channelId, messageId, or userId when relevant. Prefer components v2 for interactive content; fall back to legacy embeds only when necessary. The skill enforces gating permissions and will avoid disallowed actions.

When to use it

  • Send or schedule messages to channels or users on Discord
  • Post interactive UI using Discord components v2 (buttons, selects, displays)
  • React, pin, edit, or delete specific messages by id
  • Create threads or run short polls in a channel
  • Search recent messages across channels or within a guild

Best practices

  • Always include channel: "discord" in the action payload
  • Prefer explicit ids (guildId, channelId, messageId, userId) for predictable targeting
  • Use components v2 for rich UI and avoid combining components with embeds
  • Respect gating: do not attempt roles, moderation, presence, or channels actions if not permitted
  • Mention users as <@USER_ID> and avoid Markdown tables in outbound messages

Example use cases

  • Post a deployment status update to a dev channel using components v2 with buttons to acknowledge
  • Send a silent announcement to a channel (silent: true) to update subscribers without pinging
  • React with an emoji to a bug report message using channelId and messageId
  • Create a quick poll in #lunch-plans with options and a 24-hour duration
  • Search a guild for recent release notes across multiple channelIds and return the top matches

FAQ

Can I use embeds and components together?

No. Discord rejects mixing components v2 with legacy embeds; choose components v2 for interactive UIs or embeds only when necessary.

How do I mention a user?

Mention users with the format <@USER_ID> to trigger a proper Discord mention.