@ryantest/openclaw-qqbot 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +483 -0
- package/README.zh.md +478 -0
- package/bin/qqbot-cli.js +243 -0
- package/clawdbot.plugin.json +16 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +26 -0
- package/dist/src/admin-resolver.d.ts +27 -0
- package/dist/src/admin-resolver.js +122 -0
- package/dist/src/api.d.ts +156 -0
- package/dist/src/api.js +599 -0
- package/dist/src/channel.d.ts +11 -0
- package/dist/src/channel.js +354 -0
- package/dist/src/config.d.ts +25 -0
- package/dist/src/config.js +161 -0
- package/dist/src/credential-backup.d.ts +31 -0
- package/dist/src/credential-backup.js +66 -0
- package/dist/src/gateway.d.ts +18 -0
- package/dist/src/gateway.js +1265 -0
- package/dist/src/image-server.d.ts +68 -0
- package/dist/src/image-server.js +462 -0
- package/dist/src/inbound-attachments.d.ts +58 -0
- package/dist/src/inbound-attachments.js +234 -0
- package/dist/src/known-users.d.ts +100 -0
- package/dist/src/known-users.js +263 -0
- package/dist/src/message-queue.d.ts +50 -0
- package/dist/src/message-queue.js +115 -0
- package/dist/src/onboarding.d.ts +10 -0
- package/dist/src/onboarding.js +203 -0
- package/dist/src/outbound-deliver.d.ts +48 -0
- package/dist/src/outbound-deliver.js +462 -0
- package/dist/src/outbound.d.ts +203 -0
- package/dist/src/outbound.js +1102 -0
- package/dist/src/proactive.d.ts +170 -0
- package/dist/src/proactive.js +399 -0
- package/dist/src/ref-index-store.d.ts +70 -0
- package/dist/src/ref-index-store.js +273 -0
- package/dist/src/reply-dispatcher.d.ts +35 -0
- package/dist/src/reply-dispatcher.js +311 -0
- package/dist/src/runtime.d.ts +3 -0
- package/dist/src/runtime.js +10 -0
- package/dist/src/session-store.d.ts +52 -0
- package/dist/src/session-store.js +254 -0
- package/dist/src/slash-commands.d.ts +71 -0
- package/dist/src/slash-commands.js +1179 -0
- package/dist/src/startup-greeting.d.ts +30 -0
- package/dist/src/startup-greeting.js +78 -0
- package/dist/src/stt.d.ts +21 -0
- package/dist/src/stt.js +70 -0
- package/dist/src/tools/channel.d.ts +16 -0
- package/dist/src/tools/channel.js +234 -0
- package/dist/src/tools/remind.d.ts +2 -0
- package/dist/src/tools/remind.js +247 -0
- package/dist/src/types.d.ts +175 -0
- package/dist/src/types.js +1 -0
- package/dist/src/typing-keepalive.d.ts +27 -0
- package/dist/src/typing-keepalive.js +64 -0
- package/dist/src/update-checker.d.ts +34 -0
- package/dist/src/update-checker.js +166 -0
- package/dist/src/user-messages.d.ts +8 -0
- package/dist/src/user-messages.js +8 -0
- package/dist/src/utils/audio-convert.d.ts +89 -0
- package/dist/src/utils/audio-convert.js +704 -0
- package/dist/src/utils/file-utils.d.ts +55 -0
- package/dist/src/utils/file-utils.js +150 -0
- package/dist/src/utils/image-size.d.ts +51 -0
- package/dist/src/utils/image-size.js +234 -0
- package/dist/src/utils/media-tags.d.ts +14 -0
- package/dist/src/utils/media-tags.js +164 -0
- package/dist/src/utils/payload.d.ts +112 -0
- package/dist/src/utils/payload.js +186 -0
- package/dist/src/utils/platform.d.ts +137 -0
- package/dist/src/utils/platform.js +390 -0
- package/dist/src/utils/text-parsing.d.ts +32 -0
- package/dist/src/utils/text-parsing.js +80 -0
- package/dist/src/utils/upload-cache.d.ts +34 -0
- package/dist/src/utils/upload-cache.js +93 -0
- package/index.ts +31 -0
- package/moltbot.plugin.json +16 -0
- package/node_modules/@eshaz/web-worker/LICENSE +201 -0
- package/node_modules/@eshaz/web-worker/README.md +134 -0
- package/node_modules/@eshaz/web-worker/browser.js +17 -0
- package/node_modules/@eshaz/web-worker/cjs/browser.js +16 -0
- package/node_modules/@eshaz/web-worker/cjs/node.js +219 -0
- package/node_modules/@eshaz/web-worker/index.d.ts +4 -0
- package/node_modules/@eshaz/web-worker/node.js +223 -0
- package/node_modules/@eshaz/web-worker/package.json +54 -0
- package/node_modules/@wasm-audio-decoders/common/index.js +5 -0
- package/node_modules/@wasm-audio-decoders/common/package.json +36 -0
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.js +231 -0
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.js +129 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/README +67 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/build_puff.js +31 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.c +863 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.h +35 -0
- package/node_modules/@wasm-audio-decoders/common/src/utilities.js +3 -0
- package/node_modules/@wasm-audio-decoders/common/types.d.ts +7 -0
- package/node_modules/mpg123-decoder/README.md +265 -0
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js +185 -0
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js.map +1 -0
- package/node_modules/mpg123-decoder/index.js +8 -0
- package/node_modules/mpg123-decoder/package.json +58 -0
- package/node_modules/mpg123-decoder/src/EmscriptenWasm.js +464 -0
- package/node_modules/mpg123-decoder/src/MPEGDecoder.js +200 -0
- package/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.js +21 -0
- package/node_modules/mpg123-decoder/types.d.ts +30 -0
- package/node_modules/silk-wasm/LICENSE +21 -0
- package/node_modules/silk-wasm/README.md +85 -0
- package/node_modules/silk-wasm/lib/index.cjs +16 -0
- package/node_modules/silk-wasm/lib/index.d.ts +70 -0
- package/node_modules/silk-wasm/lib/index.mjs +16 -0
- package/node_modules/silk-wasm/lib/silk.wasm +0 -0
- package/node_modules/silk-wasm/lib/utils.d.ts +4 -0
- package/node_modules/silk-wasm/package.json +39 -0
- package/node_modules/simple-yenc/.github/FUNDING.yml +1 -0
- package/node_modules/simple-yenc/.prettierignore +1 -0
- package/node_modules/simple-yenc/LICENSE +7 -0
- package/node_modules/simple-yenc/README.md +163 -0
- package/node_modules/simple-yenc/dist/esm.js +1 -0
- package/node_modules/simple-yenc/dist/index.js +1 -0
- package/node_modules/simple-yenc/package.json +50 -0
- package/node_modules/simple-yenc/rollup.config.js +27 -0
- package/node_modules/simple-yenc/src/simple-yenc.js +302 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +13 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +554 -0
- package/node_modules/ws/lib/websocket.js +1393 -0
- package/node_modules/ws/package.json +69 -0
- package/node_modules/ws/wrapper.mjs +8 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +76 -0
- package/scripts/cleanup-legacy-plugins.sh +124 -0
- package/scripts/proactive-api-server.ts +369 -0
- package/scripts/send-proactive.ts +293 -0
- package/scripts/set-markdown.sh +156 -0
- package/scripts/test-sendmedia.ts +116 -0
- package/scripts/upgrade-via-alt-pkg.sh +307 -0
- package/scripts/upgrade-via-npm.ps1 +296 -0
- package/scripts/upgrade-via-npm.sh +301 -0
- package/scripts/upgrade-via-source.sh +774 -0
- package/skills/qqbot-channel/SKILL.md +263 -0
- package/skills/qqbot-channel/references/api_references.md +521 -0
- package/skills/qqbot-media/SKILL.md +56 -0
- package/skills/qqbot-remind/SKILL.md +149 -0
- package/src/admin-resolver.ts +140 -0
- package/src/api.ts +819 -0
- package/src/bot-logs-2026-03-21T11-21-47(2).txt +46 -0
- package/src/channel.ts +381 -0
- package/src/config.ts +187 -0
- package/src/credential-backup.ts +72 -0
- package/src/gateway.log +43 -0
- package/src/gateway.ts +1404 -0
- package/src/image-server.ts +539 -0
- package/src/inbound-attachments.ts +304 -0
- package/src/known-users.ts +353 -0
- package/src/message-queue.ts +169 -0
- package/src/onboarding.ts +274 -0
- package/src/openclaw-2026-03-21.log +3729 -0
- package/src/openclaw-plugin-sdk.d.ts +522 -0
- package/src/outbound-deliver.ts +552 -0
- package/src/outbound.ts +1266 -0
- package/src/proactive.ts +530 -0
- package/src/ref-index-store.ts +357 -0
- package/src/reply-dispatcher.ts +334 -0
- package/src/runtime.ts +14 -0
- package/src/session-store.ts +303 -0
- package/src/slash-commands.ts +1305 -0
- package/src/startup-greeting.ts +98 -0
- package/src/stt.ts +86 -0
- package/src/tools/channel.ts +281 -0
- package/src/tools/remind.ts +296 -0
- package/src/types.ts +183 -0
- package/src/typing-keepalive.ts +59 -0
- package/src/update-checker.ts +179 -0
- package/src/user-messages.ts +7 -0
- package/src/utils/audio-convert.ts +803 -0
- package/src/utils/file-utils.ts +167 -0
- package/src/utils/image-size.ts +266 -0
- package/src/utils/media-tags.ts +182 -0
- package/src/utils/payload.ts +265 -0
- package/src/utils/platform.ts +435 -0
- package/src/utils/text-parsing.ts +82 -0
- package/src/utils/upload-cache.ts +128 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qqbot-channel
|
|
3
|
+
description: QQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用此技能。
|
|
4
|
+
metadata: {"openclaw":{"emoji":"📡","requires":{"config":["channels.qqbot"]}}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# QQ 频道 API 请求指导
|
|
8
|
+
|
|
9
|
+
`qqbot_channel_api` 是一个 QQ 开放平台 HTTP 代理工具,**自动填充鉴权 Token**。你只需要指定 HTTP 方法、API 路径、请求体和查询参数。
|
|
10
|
+
|
|
11
|
+
## 📚 详细参考文档
|
|
12
|
+
|
|
13
|
+
每个接口的完整参数说明、返回值结构和枚举值定义:
|
|
14
|
+
- `references/api_references.md`
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🔧 工具参数
|
|
19
|
+
|
|
20
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
21
|
+
|------|------|------|------|
|
|
22
|
+
| `method` | string | 是 | HTTP 方法:`GET`, `POST`, `PUT`, `PATCH`, `DELETE` |
|
|
23
|
+
| `path` | string | 是 | API 路径(不含域名),如 `/guilds/{guild_id}/channels`,需替换占位符为实际值 |
|
|
24
|
+
| `body` | object | 否 | 请求体 JSON(POST/PUT/PATCH 使用) |
|
|
25
|
+
| `query` | object | 否 | URL 查询参数键值对,值为字符串类型 |
|
|
26
|
+
|
|
27
|
+
> 基础 URL:`https://api.sgroup.qq.com`,鉴权头 `Authorization: QQBot {token}` 由工具自动填充。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## ⭐ 接口速查
|
|
32
|
+
|
|
33
|
+
### 频道(Guild)
|
|
34
|
+
|
|
35
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
36
|
+
|------|------|------|----------|
|
|
37
|
+
| 获取频道列表 | `GET` | `/users/@me/guilds` | query: `before`, `after`, `limit`(最大100) |
|
|
38
|
+
| 获取频道 API 权限 | `GET` | `/guilds/{guild_id}/api_permission` | — |
|
|
39
|
+
|
|
40
|
+
### 子频道(Channel)
|
|
41
|
+
|
|
42
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
43
|
+
|------|------|------|----------|
|
|
44
|
+
| 获取子频道列表 | `GET` | `/guilds/{guild_id}/channels` | — |
|
|
45
|
+
| 获取子频道详情 | `GET` | `/channels/{channel_id}` | — |
|
|
46
|
+
| 创建子频道 | `POST` | `/guilds/{guild_id}/channels` | body: `name`\*, `type`\*, `position`\*, `sub_type`, `parent_id`, `private_type`, `private_user_ids`, `speak_permission`, `application_id` |
|
|
47
|
+
| 修改子频道 | `PATCH` | `/channels/{channel_id}` | body: `name`, `position`, `parent_id`, `private_type`, `speak_permission`(至少一个) |
|
|
48
|
+
| 删除子频道 | `DELETE` | `/channels/{channel_id}` | ⚠️ 不可逆 |
|
|
49
|
+
|
|
50
|
+
**子频道类型(type)**:`0`=文字, `2`=语音, `4`=分组(position≥2), `10005`=直播, `10006`=应用, `10007`=论坛
|
|
51
|
+
|
|
52
|
+
### 成员(Member)
|
|
53
|
+
|
|
54
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
55
|
+
|------|------|------|----------|
|
|
56
|
+
| 获取成员列表 | `GET` | `/guilds/{guild_id}/members` | query: `after`(首次填0), `limit`(1-400) |
|
|
57
|
+
| 获取成员详情 | `GET` | `/guilds/{guild_id}/members/{user_id}` | — |
|
|
58
|
+
| 获取身份组成员列表 | `GET` | `/guilds/{guild_id}/roles/{role_id}/members` | query: `start_index`(首次填0), `limit`(1-400) |
|
|
59
|
+
| 获取在线成员数 | `GET` | `/channels/{channel_id}/online_nums` | — |
|
|
60
|
+
|
|
61
|
+
### 公告(Announces)
|
|
62
|
+
|
|
63
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
64
|
+
|------|------|------|----------|
|
|
65
|
+
| 创建公告 | `POST` | `/guilds/{guild_id}/announces` | body: `message_id`, `channel_id`, `announces_type`(0=成员,1=欢迎), `recommend_channels`(最多3条) |
|
|
66
|
+
| 删除公告 | `DELETE` | `/guilds/{guild_id}/announces/{message_id}` | message_id 设 `all` 删除所有 |
|
|
67
|
+
|
|
68
|
+
### 论坛(Forum)— 仅私域机器人
|
|
69
|
+
|
|
70
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
71
|
+
|------|------|------|----------|
|
|
72
|
+
| 获取帖子列表 | `GET` | `/channels/{channel_id}/threads` | — |
|
|
73
|
+
| 获取帖子详情 | `GET` | `/channels/{channel_id}/threads/{thread_id}` | — |
|
|
74
|
+
| 发表帖子 | `PUT` | `/channels/{channel_id}/threads` | body: `title`\*, `content`\*, `format`(1=文本,2=HTML,3=Markdown,4=JSON,默认3) |
|
|
75
|
+
| 删除帖子 | `DELETE` | `/channels/{channel_id}/threads/{thread_id}` | ⚠️ 不可逆 |
|
|
76
|
+
| 发表评论 | `POST` | `/channels/{channel_id}/threads/{thread_id}/comment` | body: `thread_author`\*, `content`\*, `thread_create_time`, `image` |
|
|
77
|
+
|
|
78
|
+
### 日程(Schedule)
|
|
79
|
+
|
|
80
|
+
| 操作 | 方法 | 路径 | 参数说明 |
|
|
81
|
+
|------|------|------|----------|
|
|
82
|
+
| 创建日程 | `POST` | `/channels/{channel_id}/schedules` | body: `{ schedule: { name*, start_timestamp*, end_timestamp*, jump_channel_id, remind_type } }` |
|
|
83
|
+
| 修改日程 | `PATCH` | `/channels/{channel_id}/schedules/{schedule_id}` | body: `{ schedule: { name*, start_timestamp*, end_timestamp*, jump_channel_id, remind_type } }` |
|
|
84
|
+
| 删除日程 | `DELETE` | `/channels/{channel_id}/schedules/{schedule_id}` | ⚠️ 不可逆 |
|
|
85
|
+
|
|
86
|
+
**提醒类型(remind_type)**:`"0"`=不提醒, `"1"`=开始时, `"2"`=5分钟前, `"3"`=15分钟前, `"4"`=30分钟前, `"5"`=60分钟前
|
|
87
|
+
|
|
88
|
+
> `*` 表示必填参数
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 💡 调用示例
|
|
93
|
+
|
|
94
|
+
### 获取频道列表
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"method": "GET",
|
|
99
|
+
"path": "/users/@me/guilds",
|
|
100
|
+
"query": { "limit": "100" }
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 获取子频道列表
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"method": "GET",
|
|
109
|
+
"path": "/guilds/123456/channels"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 创建子频道
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"method": "POST",
|
|
118
|
+
"path": "/guilds/123456/channels",
|
|
119
|
+
"body": {
|
|
120
|
+
"name": "新频道",
|
|
121
|
+
"type": 0,
|
|
122
|
+
"position": 1,
|
|
123
|
+
"sub_type": 0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 获取成员列表(分页)
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"method": "GET",
|
|
133
|
+
"path": "/guilds/123456/members",
|
|
134
|
+
"query": { "after": "0", "limit": "100" }
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 发表论坛帖子
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"method": "PUT",
|
|
143
|
+
"path": "/channels/789012/threads",
|
|
144
|
+
"body": {
|
|
145
|
+
"title": "公告标题",
|
|
146
|
+
"content": "# 标题\n\n公告内容",
|
|
147
|
+
"format": 3
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 创建日程
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"method": "POST",
|
|
157
|
+
"path": "/channels/456789/schedules",
|
|
158
|
+
"body": {
|
|
159
|
+
"schedule": {
|
|
160
|
+
"name": "周会",
|
|
161
|
+
"start_timestamp": "1770733800000",
|
|
162
|
+
"end_timestamp": "1770737400000",
|
|
163
|
+
"remind_type": "2"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 创建推荐子频道公告
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"method": "POST",
|
|
174
|
+
"path": "/guilds/123456/announces",
|
|
175
|
+
"body": {
|
|
176
|
+
"announces_type": 0,
|
|
177
|
+
"recommend_channels": [
|
|
178
|
+
{ "channel_id": "789012", "introduce": "欢迎来到攻略频道" }
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 删除所有公告
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"method": "DELETE",
|
|
189
|
+
"path": "/guilds/123456/announces/all"
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🔄 常用操作流程
|
|
196
|
+
|
|
197
|
+
### 获取频道和子频道信息
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
1. GET /users/@me/guilds → 获取频道列表,拿到 guild_id
|
|
201
|
+
2. GET /guilds/{guild_id}/channels → 获取子频道列表,拿到 channel_id
|
|
202
|
+
3. GET /channels/{channel_id} → 获取子频道详情
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 论坛发帖 + 评论
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
1. GET /guilds/{guild_id}/channels → 找到论坛子频道(type=10007)
|
|
209
|
+
2. PUT /channels/{channel_id}/threads → 发表帖子
|
|
210
|
+
3. GET /channels/{channel_id}/threads → 获取帖子列表
|
|
211
|
+
4. GET /channels/{channel_id}/threads/{thread_id} → 获取帖子详情(含 author_id)
|
|
212
|
+
5. POST /channels/{channel_id}/threads/{thread_id}/comment → 发表评论
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 成员管理
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
1. GET /users/@me/guilds → 获取 guild_id
|
|
219
|
+
2. GET /guilds/{guild_id}/members?after=0&limit=100 → 获取成员列表
|
|
220
|
+
翻页:用上次最后一个 user.id 作为 after,直到返回空数组
|
|
221
|
+
3. GET /guilds/{guild_id}/members/{user_id} → 获取指定成员详情
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 展示成员头像
|
|
225
|
+
|
|
226
|
+
成员详情返回的 `user.avatar` 是头像 URL,**必须使用 Markdown 图片语法展示**,让用户直接看到头像图片,而非纯文本链接:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
成员信息:
|
|
230
|
+
· 昵称:{nick}
|
|
231
|
+
· 头像:
|
|
232
|
+

|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
> **禁止**将头像 URL 作为纯文本或超链接展示(如 `查看头像`),必须用 `` 语法内联显示。频道的 `icon` 字段同理。
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 🚨 错误码处理
|
|
240
|
+
|
|
241
|
+
| 错误码 | 说明 | 解决方案 |
|
|
242
|
+
|--------|------|----------|
|
|
243
|
+
| **401** | Token 鉴权失败 | 检查 AppID 和 ClientSecret 配置 |
|
|
244
|
+
| **11241** | 频道 API 无权限 | 前往 QQ 开放平台申请权限,或调用 `GET /guilds/{guild_id}/api_permission` 查看可用权限 |
|
|
245
|
+
| **11242** | 仅私域机器人可用 | 需在 QQ 开放平台将机器人切换为私域模式 |
|
|
246
|
+
| **11243** | 需要管理频道权限 | 确保机器人拥有管理权限 |
|
|
247
|
+
| **11281** | 日程频率限制 | 单管理员/天限 10 次,单频道/天限 100 次 |
|
|
248
|
+
| **304023** | 推荐子频道超限 | 推荐子频道最多 3 条 |
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## ⚠️ 注意事项
|
|
253
|
+
|
|
254
|
+
1. **路径中的占位符**(如 `{guild_id}`、`{channel_id}`)必须替换为实际值
|
|
255
|
+
2. **query 参数的值必须为字符串类型**,如 `{ "limit": "100" }` 而非 `{ "limit": 100 }`
|
|
256
|
+
3. **成员列表翻页**时可能返回重复成员,需按 `user.id` 去重
|
|
257
|
+
4. **公告**的两种类型(消息公告和推荐子频道公告)会互相顶替
|
|
258
|
+
5. **日程**的时间戳为毫秒级字符串
|
|
259
|
+
6. **删除操作不可逆**,请谨慎使用
|
|
260
|
+
7. **论坛操作**仅私域机器人可用
|
|
261
|
+
8. **子频道分组**(type=4)的 `position` 必须 >= 2
|
|
262
|
+
9. **日程操作**有频率限制:单个管理员每天 10 次,单个频道每天 100 次
|
|
263
|
+
10. **头像/图标展示**:成员 `user.avatar` 和频道 `icon` 等图片 URL 必须使用 Markdown 图片语法 `` 展示,禁止作为纯文本或超链接展示
|