Community程式設計與開發github.com

qqbot-channel

QQ channel management skill. Use qqbot_channel_api for explicit QQ channel-management requests; confirm write, delete, and bulk actions before calling authenticated QQ Open Platform endpoints.

qqbot-channel 是什麼?

qqbot-channel is a Claude Code agent skill that qQ channel management skill. Use qqbot_channel_api for explicit QQ channel-management requests; confirm write, delete, and bulk actions before calling authenticated QQ Open Platform endpoints.

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/extensions/qqbot/skills/qqbot-channel

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

QQ 频道 API 请求指导

qqbot_channel_api 是一个 QQ 开放平台 HTTP 代理工具,自动填充鉴权 Token。你只需要指定 HTTP 方法、API 路径、请求体和查询参数。

📚 详细参考文档

每个接口的完整参数说明、返回值结构和枚举值定义:

  • references/api_references.md

🔧 工具参数

参数类型必填说明
methodstringHTTP 方法:GET, POST, PUT, PATCH, DELETE
pathstringAPI 路径(不含域名),如 /guilds/{guild_id}/channels,需替换占位符为实际值
bodyobject请求体 JSON(POST/PUT/PATCH 使用)
queryobjectURL 查询参数键值对,值为字符串类型
confirmedbooleanDELETE 必须传 true,表示用户已确认精确删除目标
bulkConfirmedboolean批量 DELETE(如删除全部公告)必须额外传 true

基础 URL:https://api.sgroup.qq.com,鉴权头 Authorization: QQBot {token} 由工具自动填充。

🛡️ 安全边界

  • 只在用户明确要求管理 QQ 频道、子频道、公告、论坛帖子或日程时调用写入接口。
  • POSTPUTPATCHDELETE 会修改真实 QQ 资源。调用前先复述目标频道/子频道/帖子/日程和预期改动;删除、批量删除、公告覆盖等不可逆或大范围操作必须等用户确认后再执行。
  • 删除前优先用 GET/列表接口查出候选项,让用户选择具体 ID;不要根据模糊名称猜测删除目标。
  • DELETE 请求必须传 confirmed: true,否则工具会拒绝执行。announces/all 这样的批量操作还必须传 bulkConfirmed: true,只有在用户明确说要删除全部公告并再次确认后才可使用。
  • 成员资料、头像 URL、频道图标等属于用户/群组资料。默认只总结必要字段;只有用户要求查看头像/图标或视觉比对时才内联展示图片,不要无关转发头像 URL。

⭐ 接口速查

频道(Guild)

操作方法路径参数说明
获取频道列表GET/users/@me/guildsquery: before, after, limit(最大100)
获取频道 API 权限GET/guilds/{guild_id}/api_permission

子频道(Channel)

操作方法路径参数说明
获取子频道列表GET/guilds/{guild_id}/channels
获取子频道详情GET/channels/{channel_id}
创建子频道POST/guilds/{guild_id}/channelsbody: name*, type*, position*, sub_type, parent_id, private_type, private_user_ids, speak_permission, application_id
修改子频道PATCH/channels/{channel_id}body: name, position, parent_id, private_type, speak_permission(至少一个)
删除子频道见受确认保护的删除流程破坏性操作;不要在未确认时调用

子频道类型(type)0=文字, 2=语音, 4=分组(position≥2), 10005=直播, 10006=应用, 10007=论坛

成员(Member)

操作方法路径参数说明
获取成员列表GET/guilds/{guild_id}/membersquery: after(首次填0), limit(1-400)
获取成员详情GET/guilds/{guild_id}/members/{user_id}
获取身份组成员列表GET/guilds/{guild_id}/roles/{role_id}/membersquery: start_index(首次填0), limit(1-400)
获取在线成员数GET/channels/{channel_id}/online_nums

公告(Announces)

操作方法路径参数说明
创建公告POST/guilds/{guild_id}/announcesbody: message_id, channel_id, announces_type(0=成员,1=欢迎), recommend_channels(最多3条)
删除公告见受确认保护的删除流程破坏性操作;批量删除需二次确认

论坛(Forum)— 仅私域机器人

操作方法路径参数说明
获取帖子列表GET/channels/{channel_id}/threads
获取帖子详情GET/channels/{channel_id}/threads/{thread_id}
发表帖子PUT/channels/{channel_id}/threadsbody: title*, content*, format(1=文本,2=HTML,3=Markdown,4=JSON,默认3)
删除帖子见受确认保护的删除流程破坏性操作;不要在未确认时调用
发表评论POST/channels/{channel_id}/threads/{thread_id}/commentbody: thread_author*, content*, thread_create_time, image

日程(Schedule)

操作方法路径参数说明
创建日程POST/channels/{channel_id}/schedulesbody: { schedule: { name*, start_timestamp*, end_timestamp*, jump_channel_id, remind_type } }
修改日程PATCH/channels/{channel_id}/schedules/{schedule_id}body: { schedule: { name*, start_timestamp*, end_timestamp*, jump_channel_id, remind_type } }
删除日程见受确认保护的删除流程破坏性操作;不要在未确认时调用

提醒类型(remind_type)"0"=不提醒, "1"=开始时, "2"=5分钟前, "3"=15分钟前, "4"=30分钟前, "5"=60分钟前

* 表示必填参数


💡 调用示例

获取频道列表

{
  "method": "GET",
  "path": "/users/@me/guilds",
  "query": { "limit": "100" }
}

获取子频道列表

{
  "method": "GET",
  "path": "/guilds/123456/channels"
}

创建子频道

{
  "method": "POST",
  "path": "/guilds/123456/channels",
  "body": {
    "name": "新频道",
    "type": 0,
    "position": 1,
    "sub_type": 0
  }
}

获取成员列表(分页)

{
  "method": "GET",
  "path": "/guilds/123456/members",
  "query": { "after": "0", "limit": "100" }
}

发表论坛帖子

{
  "method": "PUT",
  "path": "/channels/789012/threads",
  "body": {
    "title": "公告标题",
    "content": "# 标题\n\n公告内容",
    "format": 3
  }
}

创建日程

{
  "method": "POST",
  "path": "/channels/456789/schedules",
  "body": {
    "schedule": {
      "name": "周会",
      "start_timestamp": "1770733800000",
      "end_timestamp": "1770737400000",
      "remind_type": "2"
    }
  }
}

创建推荐子频道公告

{
  "method": "POST",
  "path": "/guilds/123456/announces",
  "body": {
    "announces_type": 0,
    "recommend_channels": [{ "channel_id": "789012", "introduce": "欢迎来到攻略频道" }]
  }
}

受确认保护的删除流程

删除类 QQ API 不作为普通速查示例暴露。若用户明确要求删除资源,先读取并复述目标对象,确认后再调用 qqbot_channel_apimethod 设为 "DELETE"confirmed 设为 truepath 使用已确认对象对应的资源路径。

删除对象已确认后使用的 path额外要求
子频道/channels/{channel_id}确认子频道 ID 和名称
单条公告/guilds/{guild_id}/announces/{message_id}确认公告 ID
全部公告/guilds/{guild_id}/announces/all用户再次确认后再传 bulkConfirmed: true
帖子/channels/{channel_id}/threads/{thread_id}确认帖子 ID、标题/作者
日程/channels/{channel_id}/schedules/{schedule_id}确认日程 ID、名称/时间

🔄 常用操作流程

获取频道和子频道信息

1. GET /users/@me/guilds → 获取频道列表,拿到 guild_id
2. GET /guilds/{guild_id}/channels → 获取子频道列表,拿到 channel_id
3. GET /channels/{channel_id} → 获取子频道详情

论坛发帖 + 评论

1. GET /guilds/{guild_id}/channels → 找到论坛子频道(type=10007)
2. PUT /channels/{channel_id}/threads → 发表帖子
3. GET /channels/{channel_id}/threads → 获取帖子列表
4. GET /channels/{channel_id}/threads/{thread_id} → 获取帖子详情(含 author_id)
5. POST /channels/{channel_id}/threads/{thread_id}/comment → 发表评论

成员管理

1. GET /users/@me/guilds → 获取 guild_id
2. GET /guilds/{guild_id}/members?after=0&limit=100 → 获取成员列表
   翻页:用上次最后一个 user.id 作为 after,直到返回空数组
3. GET /guilds/{guild_id}/members/{user_id} → 获取指定成员详情

展示成员头像

成员详情返回的 user.avatar 是头像 URL。默认只展示昵称、ID、加入时间等必要字段;当用户明确要求查看头像/图标或头像是当前任务的必要依据时,再用 Markdown 图片语法内联展示:

成员信息:
· 昵称:{nick}
· 头像:
![头像](https://raw.githubusercontent.com/clawdbot/clawdbot/main/{user.avatar})

不要无关输出原始头像 URL 或把头像作为普通链接转发。频道的 icon 字段同理:仅在用户明确需要查看时展示。


🚨 错误码处理

错误码说明解决方案
401Token 鉴权失败检查 AppID 和 ClientSecret 配置
11241频道 API 无权限前往 QQ 开放平台申请权限,或调用 GET /guilds/{guild_id}/api_permission 查看可用权限
11242仅私域机器人可用需在 QQ 开放平台将机器人切换为私域模式
11243需要管理频道权限确保机器人拥有管理权限
11281日程频率限制单管理员/天限 10 次,单频道/天限 100 次
304023推荐子频道超限推荐子频道最多 3 条

⚠️ 注意事项

  1. 路径中的占位符(如 {guild_id}{channel_id})必须替换为实际值
  2. query 参数的值必须为字符串类型,如 { "limit": "100" } 而非 { "limit": 100 }
  3. 成员列表翻页时可能返回重复成员,需按 user.id 去重
  4. 公告的两种类型(消息公告和推荐子频道公告)会互相顶替
  5. 日程的时间戳为毫秒级字符串
  6. 删除操作不可逆,必须先确认精确目标并传 confirmed: true;批量删除需二次确认并传 bulkConfirmed: true
  7. 论坛操作仅私域机器人可用
  8. 子频道分组(type=4)的 position 必须 >= 2
  9. 日程操作有频率限制:单个管理员每天 10 次,单个频道每天 100 次
  10. 头像/图标展示:成员 user.avatar 和频道 icon 等图片 URL 属于资料信息;默认总结必要字段,只在用户明确需要查看图片时用 Markdown 图片语法 ![描述](https://raw.githubusercontent.com/clawdbot/clawdbot/main/URL) 展示

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

agent-transcript

Add a redacted agent transcript section to GitHub PR or issue bodies during OpenClaw agent-created PR/issue workflows.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

autoreview

Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Use for OpenClaw clawtributors PR/issue triage: Discrawl discovery, live-open rechecks, deep review, topic grouping, and compact @handle/LOC/type/blast/verification summaries.

clawhub

Search ClawHub for skills when a requested capability is not already available; install, verify, update, publish, or sync skills.

claw-score

Audit or refresh OpenClaw maturity scorecard docs from root taxonomy, maturity scores, and QA evidence artifacts without using maintainer discrawl data or committed inventory reports.

clawsweeper

Use for all ClawSweeper work: OpenClaw issue/PR sweep reports, commit-review reports, repair jobs, cloud fix PRs, @clawsweeper maintainer mention commands, trusted ClawSweeper-reviewed autofix/automerge, GitHub Actions monitoring, permissions, gates, and manual backfills.

clownfish-cloud-pr

Use when launching Clownfish in GitHub Actions to create or update one guarded GitHub implementation PR from issue/PR refs, a ClawSweeper report, a custom maintainer prompt, or to opt an existing Clownfish PR into ClawSweeper-reviewed cloud automerge.

相關技能