Community程式設計與開發github.com

qqbot-channel

QQ 頻道管理技能。使用 qqbot_channel_api 進行明確的 QQ 頻道管理請求;在呼叫已驗證的 QQ 開放平台端點前,務必確認寫入、刪除及大量操作。

qqbot-channel 是什麼?

這是一個專為 AI 助手設計的 QQ 頻道管理技能,透過標準化 HTTP 請求自動填充存取憑證,讓 AI 能與 QQ 開放平台 API 直接互動。涵蓋頻道、子頻道、成員管理、公告、論壇及日程排程等核心功能,並內建完善的確認機制,確保在執行刪除等不可逆操作前,必須經過使用者明確許可,防止誤操作或未經授權的變更。支援 Claude Code 等主流 AI 代理工具,遵循嚴格的資料安全邊界,例如非必要時不轉發成員頭像或頻道圖示,以保護使用者資訊。此外提供常用工作流程範例與錯誤碼處理指南,幫助開發者快速整合與排錯。

相容平台~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 的新對話。

預覽

來自技能 README

頭像
描述

說明文件

QQ 頻道 API 請求指導

qqbot_channel_api 是一個 QQ 開放平台 HTTP 代理工具,自動填入鑑權 Token。你只需指定 HTTP 方法、API 路徑、請求體和查詢參數。

📚 詳細參考文件

每個介面的完整參數說明、回傳值結構和列舉值定義:

  • references/api_references.md

🔧 工具參數

參數類型必填說明
methodstring是HTTP 方法:GET, POST, PUT, PATCH, DELETE
pathstring是API 路徑(不含域名),如 /guilds/{guild_id}/channels,需取代佔位符為實際值
bodyobject否請求體 JSON(POST/PUT/PATCH 使用)
queryobject否URL 查詢參數鍵值對,值為字串類型
confirmedboolean否DELETE 必須傳 true,表示使用者已確認精確刪除目標
bulkConfirmedboolean否批量 DELETE(如刪除全部公告)必須額外傳 true

基礎 URL:https://api.sgroup.qq.com,鑑權頭 Authorization: QQBot {token} 由工具自動填入。

🛡️ 安全邊界

  • 僅在使用者明確要求管理 QQ 頻道、子頻道、公告、論壇帖子或日程時才呼叫寫入介面。
  • POST、PUT、PATCH 和 DELETE 會修改真實 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_api:method 設為 "DELETE",confirmed 設為 true,path 使用已確認物件對應的資源路徑。

刪除物件已確認後使用的 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, Grok Build, 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.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

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.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

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.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

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 and local webcams, including USB pan/tilt/zoom control.

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

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相關技能