Discord Channel Auditor
Keep a server guide channel automatically synced with actual Discord channels.
Requirements
- - OpenClaw with Discord channel configured (no extra credentials needed)
- Uses OpenClaw's built-in
message tool for all Discord operations (channel-list, read, send, delete, edit) - Bot must have "View Channel" permission in the guild to list channels
- Bot must have "Send Messages" + "Manage Messages" in the guide channel to post/delete
When to Use
- - Maintaining a #how-to or #server-guide channel
- After creating, renaming, deleting, or moving channels
- On a daily cron to catch drift
Workflow
- 1. Fetch channel list using
message(action=channel-list) for the guild - Read current guide using
message(action=read) on the guide channel - Compare -- check for:
- New channels not in the guide
- Channels in the guide that no longer exist
- Renamed channels (ID exists, name changed)
- Moved channels (different category)
- Wrong descriptions
- 4. If changes found: Delete old guide messages and post fresh guide
- If no changes: Do nothing (save tokens)
Guide Format
Organize by category in Discord display order (by position). Use this structure:
CODEBLOCK0
Rules
- - Keep descriptions to one line, max ~10 words
- Match category emoji to Discord category name
- List channels in position order within each category
- Include a "General tips" section at the bottom
- Post as 1-2 messages max (Discord 2000 char limit per message)
- Skip voice channels unless specifically relevant
Cron Setup
CODEBLOCK1
Edge Cases
- - New category with no channels: include header, note "(empty)"
- Private channels: skip unless the bot has access
- Archived channels: skip
Discord 频道审计器
自动保持服务器指南频道与实际 Discord 频道同步。
要求
- - OpenClaw 需配置 Discord 频道(无需额外凭证)
- 使用 OpenClaw 内置的 message 工具执行所有 Discord 操作(channel-list、read、send、delete、edit)
- 机器人必须拥有服务器中查看频道权限才能列出频道
- 机器人必须在指南频道中拥有发送消息和管理消息权限才能发布/删除消息
使用场景
- - 维护 #how-to 或 #server-guide 频道
- 在创建、重命名、删除或移动频道之后
- 每日定时任务以捕捉差异
工作流程
- 1. 获取频道列表:使用 message(action=channel-list) 获取服务器频道
- 读取当前指南:在指南频道中使用 message(action=read) 读取内容
- 对比 -- 检查:
- 指南中未包含的新频道
- 指南中存在但已不存在的频道
- 已重命名的频道(ID 存在但名称改变)
- 已移动的频道(分类不同)
- 错误的描述
- 4. 如有变更: 删除旧指南消息并发布新指南
- 如无变更: 不执行任何操作(节省令牌)
指南格式
按 Discord 显示顺序(按位置)以分类组织。使用以下结构:
📥 分类名称
- - #频道名称 -- 用途简要说明
- #另一个频道 -- 此处内容说明
💼 另一个分类
规则
- - 描述保持一行,最多约 10 个词
- 分类表情符号与 Discord 分类名称匹配
- 频道按每个分类内的位置顺序列出
- 底部包含通用提示部分
- 最多发布 1-2 条消息(Discord 每条消息 2000 字符限制)
- 跳过语音频道,除非特别相关
定时任务设置
计划:每日安静时段(例如当地时间早上 6 点)
会话:独立
超时:120 秒
交付:无(不通知,仅静默更新)
边界情况
- - 无频道的新分类:包含标题,注明(空)
- 私密频道:跳过,除非机器人有访问权限
- 归档频道:跳过