首页
看点啥
插画图片
首页 科技看点 Discord 技能:自动化消息、投票和管理 - Openclaw Skills

Discord 技能:自动化消息、投票和管理 - Openclaw Skills

2026-08-18 0

什么是 AI 智能体的 Discord 动作插件?

Discord 技能赋予您的 AI 编码智能体能力,使其成为社区或团队工作区中的活跃参与者。通过利用 Openclaw Skills,智能体可以发送动态消息、管理复杂的线程,甚至处理角色管理和用户审核等行政任务。此技能旨在弥合开发工作流程与团队沟通之间的差距,实现自动状态更新、部署成功后的庆祝贴纸或团队决策的快速投票。

它遵循特定的对话风格指南,确保机器人与人类用户自然互动,避免正式的长篇大论,转而使用简洁且带有表情符号的回复。无论您是在构建支持机器人还是 DevOps 助手,此技能都提供了必要的挂钩,将 LLM 转化为功能齐全的 Discord 参与者。

下载入口:https://github.com/openclaw/skills/tree/main/skills/steipete/discord

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install discord

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 discord。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

AI 智能体的 Discord 动作插件 应用场景

AI 智能体的 Discord 动作插件 工作原理
  1. AI 智能体收到需要 Discord 交互的提示,并从 Openclaw Skills 库中选择合适的动作。
  2. 智能体格式化一个 JSON 请求,指定动作(例如 react、sticker 或 sendMessage)。
  3. 工具验证输入,如 channelId、guildId 或消息目标所需的特定格式。
  4. 它使用为环境配置的机器人令牌针对 Discord API 执行请求。
  5. 技能返回上下文(如消息 ID 或频道状态),智能体可以在后续动作(如编辑或建立线程)中重用这些上下文。

AI 智能体的 Discord 动作插件 配置指南

要将其集成到您的 Openclaw Skills 设置中,请确保您配置了有效的 Discord 机器人令牌。您可以通过修改配置中的门控设置来控制智能体可使用的动作。

# 示例:设置动作门控(概念性)
discord.actions.moderation=false
discord.actions.roles=true

请确保机器人在 Discord 开发者门户中具有您希望自动化的操作所需的网关意图(Gateway Intents)和权限(例如消息内容意图)。

AI 智能体的 Discord 动作插件 数据架构与分类体系

该技能根据 Discord API 层级结构组织交互数据,使用特定标识符进行定位。

参数 类型 描述
to 字符串 使用 channel: 或 user: 格式的目标位置。
channelId 字符串 Discord 频道的唯一 snowflake ID。
mediaUrl 字符串 媒体路径;本地支持 file:///,远程支持 https://。
poll 对象 包含问题、答案(2-10 个)和多选选项。
guildId 字符串 Discord 服务器(公会)的唯一 ID。
name: discord
description: Use when you need to control Discord from Clawdbot via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, fetch permissions or member/role/channel info, or handle moderation actions in Discord DMs or channels.

Discord Actions

Overview

Use discord to manage messages, reactions, threads, polls, and moderation. You can disable groups via discord.actions.* (defaults to enabled, except roles/moderation). The tool uses the bot token configured for Clawdbot.

Inputs to collect

Message context lines include discord message id and channel fields you can reuse directly.

Note: sendMessage uses to: "channel:" format, not channelId. Other actions like react, readMessages, editMessage use channelId directly.

Actions

React to a message

{
  "action": "react",
  "channelId": "123",
  "messageId": "456",
  "emoji": "?"
}

List reactions + users

{
  "action": "reactions",
  "channelId": "123",
  "messageId": "456",
  "limit": 100
}

Send a sticker

{
  "action": "sticker",
  "to": "channel:123",
  "stickerIds": ["9876543210"],
  "content": "Nice work!"
}

Upload a custom emoji

{
  "action": "emojiUpload",
  "guildId": "999",
  "name": "party_blob",
  "mediaUrl": "file:///tmp/party.png",
  "roleIds": ["222"]
}

Upload a sticker

{
  "action": "stickerUpload",
  "guildId": "999",
  "name": "clawdbot_wave",
  "description": "Clawdbot waving hello",
  "tags": "??",
  "mediaUrl": "file:///tmp/wave.png"
}

Create a poll

{
  "action": "poll",
  "to": "channel:123",
  "question": "Lunch?",
  "answers": ["Pizza", "Sushi", "Salad"],
  "allowMultiselect": false,
  "durationHours": 24,
  "content": "Vote now"
}

Check bot permissions for a channel

{
  "action": "permissions",
  "channelId": "123"
}

Ideas to try

Action gating

Use discord.actions.* to disable action groups:

Read recent messages

{
  "action": "readMessages",
  "channelId": "123",
  "limit": 20
}

Send/edit/delete a message

{
  "action": "sendMessage",
  "to": "channel:123",
  "content": "Hello from Clawdbot"
}

With media attachment:

{
  "action": "sendMessage",
  "to": "channel:123",
  "content": "Check out this audio!",
  "mediaUrl": "file:///tmp/audio.mp3"
}
{
  "action": "editMessage",
  "channelId": "123",
  "messageId": "456",
  "content": "Fixed typo"
}
{
  "action": "deleteMessage",
  "channelId": "123",
  "messageId": "456"
}

Threads

{
  "action": "threadCreate",
  "channelId": "123",
  "name": "Bug triage",
  "messageId": "456"
}
{
  "action": "threadList",
  "guildId": "999"
}
{
  "action": "threadReply",
  "channelId": "777",
  "content": "Replying in thread"
}

Pins

{
  "action": "pinMessage",
  "channelId": "123",
  "messageId": "456"
}
{
  "action": "listPins",
  "channelId": "123"
}

Search messages

{
  "action": "searchMessages",
  "guildId": "999",
  "content": "release notes",
  "channelIds": ["123", "456"],
  "limit": 10
}

Member + role info

{
  "action": "memberInfo",
  "guildId": "999",
  "userId": "111"
}
{
  "action": "roleInfo",
  "guildId": "999"
}

List available custom emojis

{
  "action": "emojiList",
  "guildId": "999"
}

Role changes (disabled by default)

{
  "action": "roleAdd",
  "guildId": "999",
  "userId": "111",
  "roleId": "222"
}

Channel info

{
  "action": "channelInfo",
  "channelId": "123"
}
{
  "action": "channelList",
  "guildId": "999"
}

Voice status

{
  "action": "voiceStatus",
  "guildId": "999",
  "userId": "111"
}

Scheduled events

{
  "action": "eventList",
  "guildId": "999"
}

Moderation (disabled by default)

{
  "action": "timeout",
  "guildId": "999",
  "userId": "111",
  "durationMinutes": 10
}

Discord Writing Style Guide

Keep it conversational! Discord is a chat platform, not documentation.

Do

Don't

Formatting that works

Example transformations

? Bad:

I'd be happy to help with that! Here's a comprehensive overview of the versioning strategies available:

## Semantic Versioning
Semver uses MAJOR.MINOR.PATCH format where...

## Calendar Versioning
CalVer uses date-based versions like...

? Good:

versioning options: semver (1.2.3), calver (2026.01.04), or yolo (`latest` forever). what fits your release cadence?
喜欢(0)

上一篇

Tavily AI 搜索:为 AI 智能体优化的网络研究 - Openclaw Skills

下一篇

PDF 处理技能:提取、合并与文档自动化 - Openclaw Skills

猜你喜欢