napcat-cli 2.0.0__py3-none-any.whl
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.
- napcat_cli/__init__.py +3 -0
- napcat_cli/cli.py +1834 -0
- napcat_cli/daemon/__init__.py +1 -0
- napcat_cli/daemon/schemas.py +470 -0
- napcat_cli/daemon/watch.py +1994 -0
- napcat_cli/data/SKILL.md +328 -0
- napcat_cli/data/__init__.py +0 -0
- napcat_cli/data/persona.md +155 -0
- napcat_cli/data/references/mounting.md +90 -0
- napcat_cli/data/skills-fs-config.json +12 -0
- napcat_cli/data/skills-fs-fragment.json +473 -0
- napcat_cli/data/skills-fs.d/agents-friend-time.md +7 -0
- napcat_cli/data/skills-fs.d/agents-friend.md +7 -0
- napcat_cli/data/skills-fs.d/agents-friends.md +4 -0
- napcat_cli/data/skills-fs.d/agents-group-time.md +7 -0
- napcat_cli/data/skills-fs.d/agents-group.md +6 -0
- napcat_cli/data/skills-fs.d/agents-groups.md +5 -0
- napcat_cli/data/skills-fs.d/agents-napcat.md +9 -0
- napcat_cli/data/skills-fs.d/persona.md +155 -0
- napcat_cli/data/skills-fs.d/skill-agents.md +42 -0
- napcat_cli/data/skills-fs.d/skill-body.md +102 -0
- napcat_cli/lib/__init__.py +1 -0
- napcat_cli/lib/api.py +258 -0
- napcat_cli/lib/config.py +105 -0
- napcat_cli/lib/events.py +127 -0
- napcat_cli/lib/events_sqlite.py +242 -0
- napcat_cli/lib/message.py +156 -0
- napcat_cli/setup_wizard.py +380 -0
- napcat_cli/tui/__init__.py +1 -0
- napcat_cli/tui/__main__.py +13 -0
- napcat_cli/tui/api.py +158 -0
- napcat_cli/tui/app.py +127 -0
- napcat_cli/tui/chat_list.py +168 -0
- napcat_cli/tui/chat_view.py +456 -0
- napcat_cli/tui/styles.tcss +9 -0
- napcat_cli/wake.py +51 -0
- napcat_cli/wake_backend.py +390 -0
- napcat_cli/wake_orchestrator.py +302 -0
- napcat_cli/wake_presets.py +77 -0
- napcat_cli-2.0.0.dist-info/METADATA +219 -0
- napcat_cli-2.0.0.dist-info/RECORD +43 -0
- napcat_cli-2.0.0.dist-info/WHEEL +4 -0
- napcat_cli-2.0.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""napcat-cli daemon."""
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""NapCat action schemas — single source of truth for all write action parameters.
|
|
3
|
+
|
|
4
|
+
Used by:
|
|
5
|
+
- watch.py: describe_action, structured error responses
|
|
6
|
+
- gen_mounts.py: generating .schema blob data for skills-fs mounts
|
|
7
|
+
- CLI napcat schema: printing action documentation
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
ACTION_SCHEMAS: dict[str, dict] = {
|
|
12
|
+
# ------------------------------------------------------------------
|
|
13
|
+
# Custom internal actions (handled directly in _dispatch)
|
|
14
|
+
# ------------------------------------------------------------------
|
|
15
|
+
"send_group_message": {
|
|
16
|
+
"params": ["group_id", "message"],
|
|
17
|
+
"example": {"group_id": "123456", "message": "hello world"},
|
|
18
|
+
"required": ["group_id", "message"],
|
|
19
|
+
"description": "Send a message to a QQ group.",
|
|
20
|
+
},
|
|
21
|
+
"send_private_message": {
|
|
22
|
+
"params": ["user_id", "message"],
|
|
23
|
+
"example": {"user_id": "12345678", "message": "hello"},
|
|
24
|
+
"required": ["user_id", "message"],
|
|
25
|
+
"description": "Send a private message to a QQ user.",
|
|
26
|
+
},
|
|
27
|
+
"clear_alert": {
|
|
28
|
+
"params": ["name"],
|
|
29
|
+
"example": {"name": "NEW_MESSAGE"},
|
|
30
|
+
"required": ["name"],
|
|
31
|
+
"description": "Clear alerts of a specific name.",
|
|
32
|
+
},
|
|
33
|
+
"clear_all_alerts": {
|
|
34
|
+
"params": [],
|
|
35
|
+
"example": {},
|
|
36
|
+
"required": [],
|
|
37
|
+
"description": "Clear all pending alerts.",
|
|
38
|
+
},
|
|
39
|
+
# ------------------------------------------------------------------
|
|
40
|
+
# Proxied NapCat API actions (napcat_ prefix → API action)
|
|
41
|
+
# ------------------------------------------------------------------
|
|
42
|
+
"napcat_send_group_msg": {
|
|
43
|
+
"params": ["group_id", "message"],
|
|
44
|
+
"example": {"group_id": "123456", "message": "hello"},
|
|
45
|
+
"required": ["group_id", "message"],
|
|
46
|
+
"description": "Send a group message (proxied to send_msg with message_type=group).",
|
|
47
|
+
},
|
|
48
|
+
"napcat_send_private_msg": {
|
|
49
|
+
"params": ["user_id", "message"],
|
|
50
|
+
"example": {"user_id": "12345678", "message": "hello"},
|
|
51
|
+
"required": ["user_id", "message"],
|
|
52
|
+
"description": "Send a private message (proxied to send_msg with message_type=private).",
|
|
53
|
+
},
|
|
54
|
+
"napcat_delete_msg": {
|
|
55
|
+
"params": ["message_id"],
|
|
56
|
+
"example": {"message_id": "987654321"},
|
|
57
|
+
"required": ["message_id"],
|
|
58
|
+
"description": "Delete/recall a sent message. Rules: bot recalling its own message must act within 2 minutes. Admin can recall any member message with no time limit. Group owner can recall any message with no time limit.",
|
|
59
|
+
},
|
|
60
|
+
"napcat_set_group_kick": {
|
|
61
|
+
"params": ["group_id", "user_id", "reject_add_request"],
|
|
62
|
+
"example": {"group_id": "123456", "user_id": "12345678"},
|
|
63
|
+
"required": ["group_id", "user_id"],
|
|
64
|
+
"description": "Kick a member from a group. Set reject_add_request to prevent rejoining.",
|
|
65
|
+
},
|
|
66
|
+
"napcat_set_group_ban": {
|
|
67
|
+
"params": ["group_id", "user_id", "duration"],
|
|
68
|
+
"example": {"group_id": "123456", "user_id": "12345678", "duration": 600},
|
|
69
|
+
"required": ["group_id", "user_id", "duration"],
|
|
70
|
+
"description": "Ban a group member. Duration is in seconds; 0 means unban.",
|
|
71
|
+
},
|
|
72
|
+
"napcat_set_essence": {
|
|
73
|
+
"params": ["group_id", "message_id"],
|
|
74
|
+
"example": {"group_id": "123456", "message_id": "987654321"},
|
|
75
|
+
"required": ["group_id", "message_id"],
|
|
76
|
+
"description": "Set or unset a message as group essence message.",
|
|
77
|
+
},
|
|
78
|
+
"napcat_group_sign": {
|
|
79
|
+
"params": ["group_id"],
|
|
80
|
+
"example": {"group_id": "123456"},
|
|
81
|
+
"required": ["group_id"],
|
|
82
|
+
"description": "Sign in to a group (daily check-in).",
|
|
83
|
+
},
|
|
84
|
+
"napcat_set_group_admin": {
|
|
85
|
+
"params": ["group_id", "user_id", "enable"],
|
|
86
|
+
"example": {"group_id": "123456", "user_id": "12345678", "enable": True},
|
|
87
|
+
"required": ["group_id", "user_id", "enable"],
|
|
88
|
+
"description": "Set or unset group admin for a member.",
|
|
89
|
+
},
|
|
90
|
+
"napcat_set_group_entire_title": {
|
|
91
|
+
"params": ["group_id", "title"],
|
|
92
|
+
"example": {"group_id": "123456", "title": "My Group Title"},
|
|
93
|
+
"required": ["group_id", "title"],
|
|
94
|
+
"description": "Set the group owner's special title for the entire group.",
|
|
95
|
+
},
|
|
96
|
+
"napcat_set_group_name": {
|
|
97
|
+
"params": ["group_id", "group_name"],
|
|
98
|
+
"example": {"group_id": "123456", "group_name": "New Group Name"},
|
|
99
|
+
"required": ["group_id", "group_name"],
|
|
100
|
+
"description": "Set the group name.",
|
|
101
|
+
},
|
|
102
|
+
"napcat_set_group_portrait": {
|
|
103
|
+
"params": ["group_id", "file"],
|
|
104
|
+
"example": {"group_id": "123456", "file": "file:///path/to/image.png"},
|
|
105
|
+
"required": ["group_id", "file"],
|
|
106
|
+
"description": "Set the group portrait/avatar. File can be a local path (file:///), URL, or base64.",
|
|
107
|
+
},
|
|
108
|
+
"napcat_create_group": {
|
|
109
|
+
"params": ["group_name", "member_ids"],
|
|
110
|
+
"example": {"group_name": "My Group", "member_ids": [12345678, 87654321]},
|
|
111
|
+
"required": ["group_name"],
|
|
112
|
+
"description": "Create a new QQ group. Optionally invite members via member_ids.",
|
|
113
|
+
},
|
|
114
|
+
"napcat_group_leave": {
|
|
115
|
+
"params": ["group_id", "reject"],
|
|
116
|
+
"example": {"group_id": "123456"},
|
|
117
|
+
"required": ["group_id"],
|
|
118
|
+
"description": "Leave a group. Set reject to block future join requests.",
|
|
119
|
+
},
|
|
120
|
+
"napcat_send_like": {
|
|
121
|
+
"params": ["user_id", "times"],
|
|
122
|
+
"example": {"user_id": "12345678", "times": 1},
|
|
123
|
+
"required": ["user_id"],
|
|
124
|
+
"description": "Send like(s) to a user. Times defaults to 1, max 10 per call.",
|
|
125
|
+
},
|
|
126
|
+
"napcat_forward_msg": {
|
|
127
|
+
"params": ["group_id", "message_id"],
|
|
128
|
+
"example": {"group_id": "123456", "message_id": "987654321"},
|
|
129
|
+
"required": ["group_id", "message_id"],
|
|
130
|
+
"description": "Forward a message to another group.",
|
|
131
|
+
},
|
|
132
|
+
"napcat_send_friend_request": {
|
|
133
|
+
"params": ["user_id", "remark"],
|
|
134
|
+
"example": {"user_id": "12345678", "remark": "Hey there"},
|
|
135
|
+
"required": ["user_id"],
|
|
136
|
+
"description": "Send a friend request to a user. Remark is optional.",
|
|
137
|
+
},
|
|
138
|
+
"napcat_get_stranger_info": {
|
|
139
|
+
"params": ["user_id", "no_cache"],
|
|
140
|
+
"example": {"user_id": "12345678"},
|
|
141
|
+
"required": ["user_id"],
|
|
142
|
+
"description": "Get information about a stranger (read-only).",
|
|
143
|
+
},
|
|
144
|
+
"napcat_delete_friend": {
|
|
145
|
+
"params": ["user_id"],
|
|
146
|
+
"example": {"user_id": "12345678"},
|
|
147
|
+
"required": ["user_id"],
|
|
148
|
+
"description": "Remove a user from the friend list.",
|
|
149
|
+
},
|
|
150
|
+
"napcat_get_credentials": {
|
|
151
|
+
"params": [],
|
|
152
|
+
"example": {},
|
|
153
|
+
"required": [],
|
|
154
|
+
"description": "Get bot credentials (SSO cookies, etc.). Read-only.",
|
|
155
|
+
},
|
|
156
|
+
"napcat_get_cookies": {
|
|
157
|
+
"params": ["domain"],
|
|
158
|
+
"example": {"domain": "qq.com"},
|
|
159
|
+
"required": [],
|
|
160
|
+
"description": "Get cookies for a specific domain. Domain is optional.",
|
|
161
|
+
},
|
|
162
|
+
"napcat_get_bkn": {
|
|
163
|
+
"params": ["cookies"],
|
|
164
|
+
"example": {"cookies": "bkn=..."},
|
|
165
|
+
"required": [],
|
|
166
|
+
"description": "Calculate BKN token from cookies.",
|
|
167
|
+
},
|
|
168
|
+
"napcat_get_status": {
|
|
169
|
+
"params": [],
|
|
170
|
+
"example": {},
|
|
171
|
+
"required": [],
|
|
172
|
+
"description": "Get bot online status and health. Read-only.",
|
|
173
|
+
},
|
|
174
|
+
"napcat_get_config": {
|
|
175
|
+
"params": [],
|
|
176
|
+
"example": {},
|
|
177
|
+
"required": [],
|
|
178
|
+
"description": "Get bot configuration. Read-only.",
|
|
179
|
+
},
|
|
180
|
+
"napcat_get_image": {
|
|
181
|
+
"params": ["url"],
|
|
182
|
+
"example": {"url": "https://example.com/image.png"},
|
|
183
|
+
"required": ["url"],
|
|
184
|
+
"description": "Download an image by URL.",
|
|
185
|
+
},
|
|
186
|
+
"napcat_ocr": {
|
|
187
|
+
"params": ["image"],
|
|
188
|
+
"example": {"image": "file:///path/to/image.png"},
|
|
189
|
+
"required": ["image"],
|
|
190
|
+
"description": "Perform OCR on an image. Image can be a file path, URL, or base64.",
|
|
191
|
+
},
|
|
192
|
+
"napcat_goon": {
|
|
193
|
+
"params": [],
|
|
194
|
+
"example": {},
|
|
195
|
+
"required": [],
|
|
196
|
+
"description": "Continue/resume a pending task (NapCat-specific).",
|
|
197
|
+
},
|
|
198
|
+
"napcat_approve_request": {
|
|
199
|
+
"params": ["request_id", "request_type"],
|
|
200
|
+
"example": {"request_id": "111111111", "request_type": "group"},
|
|
201
|
+
"required": ["request_id", "request_type"],
|
|
202
|
+
"description": 'Approve an incoming request. request_type: "group" or "friend".',
|
|
203
|
+
},
|
|
204
|
+
"napcat_reject_request": {
|
|
205
|
+
"params": ["request_id", "request_type"],
|
|
206
|
+
"example": {"request_id": "111111111", "request_type": "group"},
|
|
207
|
+
"required": ["request_id", "request_type"],
|
|
208
|
+
"description": 'Reject an incoming request. request_type: "group" or "friend".',
|
|
209
|
+
},
|
|
210
|
+
"napcat_send_group_notice": {
|
|
211
|
+
"params": ["group_id", "title", "content", "hints"],
|
|
212
|
+
"example": {"group_id": "123456", "title": "Notice", "content": "Hello everyone"},
|
|
213
|
+
"required": ["group_id", "content"],
|
|
214
|
+
"description": "Send a group notice/announcement.",
|
|
215
|
+
},
|
|
216
|
+
"napcat_set_group_card": {
|
|
217
|
+
"params": ["group_id", "user_id", "card"],
|
|
218
|
+
"example": {"group_id": "123456", "user_id": "12345678", "card": "Nickname"},
|
|
219
|
+
"required": ["group_id", "user_id", "card"],
|
|
220
|
+
"description": "Set a member's group card (nickname in group).",
|
|
221
|
+
},
|
|
222
|
+
"napcat_set_group_remark": {
|
|
223
|
+
"params": ["group_id", "remark"],
|
|
224
|
+
"example": {"group_id": "123456", "remark": "My Remark"},
|
|
225
|
+
"required": ["group_id", "remark"],
|
|
226
|
+
"description": "Set the bot's remark for a group.",
|
|
227
|
+
},
|
|
228
|
+
"napcat_set_friend_remark": {
|
|
229
|
+
"params": ["user_id", "remark"],
|
|
230
|
+
"example": {"user_id": "12345678", "remark": "Friend Remark"},
|
|
231
|
+
"required": ["user_id", "remark"],
|
|
232
|
+
"description": "Set the bot's remark for a friend.",
|
|
233
|
+
},
|
|
234
|
+
"napcat_upload_group_file": {
|
|
235
|
+
"params": ["group_id", "file", "name", "folder"],
|
|
236
|
+
"example": {"group_id": "123456", "file": "file:///path/to/file.txt", "name": "file.txt"},
|
|
237
|
+
"required": ["group_id", "file"],
|
|
238
|
+
"description": "Upload a file to a group. Folder is optional.",
|
|
239
|
+
},
|
|
240
|
+
"napcat_upload_private_file": {
|
|
241
|
+
"params": ["user_id", "file", "name"],
|
|
242
|
+
"example": {"user_id": "12345678", "file": "file:///path/to/file.txt", "name": "file.txt"},
|
|
243
|
+
"required": ["user_id", "file"],
|
|
244
|
+
"description": "Upload a file to a private chat.",
|
|
245
|
+
},
|
|
246
|
+
# ------------------------------------------------------------------
|
|
247
|
+
# Bare OneBot API action names (used by per-group/per-friend mounts)
|
|
248
|
+
# ------------------------------------------------------------------
|
|
249
|
+
"set_group_kick": {
|
|
250
|
+
"params": ["group_id", "user_id", "reject_add_request"],
|
|
251
|
+
"example": {"group_id": "123456", "user_id": "12345678"},
|
|
252
|
+
"required": ["group_id", "user_id"],
|
|
253
|
+
"description": "Kick a member from a group (OneBot action name).",
|
|
254
|
+
},
|
|
255
|
+
"set_group_ban": {
|
|
256
|
+
"params": ["group_id", "user_id", "duration"],
|
|
257
|
+
"example": {"group_id": "123456", "user_id": "12345678", "duration": 600},
|
|
258
|
+
"required": ["group_id", "user_id", "duration"],
|
|
259
|
+
"description": "Ban/unban a group member (OneBot action name).",
|
|
260
|
+
},
|
|
261
|
+
"set_group_admin": {
|
|
262
|
+
"params": ["group_id", "user_id", "enable"],
|
|
263
|
+
"example": {"group_id": "123456", "user_id": "12345678", "enable": True},
|
|
264
|
+
"required": ["group_id", "user_id", "enable"],
|
|
265
|
+
"description": "Set/unset group admin (OneBot action name).",
|
|
266
|
+
},
|
|
267
|
+
"set_group_card": {
|
|
268
|
+
"params": ["group_id", "user_id", "card"],
|
|
269
|
+
"example": {"group_id": "123456", "user_id": "12345678", "card": "Nickname"},
|
|
270
|
+
"required": ["group_id", "user_id", "card"],
|
|
271
|
+
"description": "Set a member's group card (OneBot action name).",
|
|
272
|
+
},
|
|
273
|
+
"set_group_name": {
|
|
274
|
+
"params": ["group_id", "group_name"],
|
|
275
|
+
"example": {"group_id": "123456", "group_name": "New Group Name"},
|
|
276
|
+
"required": ["group_id", "group_name"],
|
|
277
|
+
"description": "Set group name (OneBot action name).",
|
|
278
|
+
},
|
|
279
|
+
"group_leave": {
|
|
280
|
+
"params": ["group_id", "reject"],
|
|
281
|
+
"example": {"group_id": "123456"},
|
|
282
|
+
"required": ["group_id"],
|
|
283
|
+
"description": "Leave a group (OneBot action name).",
|
|
284
|
+
},
|
|
285
|
+
"send_group_notice": {
|
|
286
|
+
"params": ["group_id", "title", "content", "hints"],
|
|
287
|
+
"example": {"group_id": "123456", "title": "Notice", "content": "Hello everyone"},
|
|
288
|
+
"required": ["group_id", "content"],
|
|
289
|
+
"description": "Send a group notice/announcement (OneBot action name).",
|
|
290
|
+
},
|
|
291
|
+
"send_poke": {
|
|
292
|
+
"params": ["group_id", "user_id"],
|
|
293
|
+
"example": {"group_id": "123456", "user_id": "12345678"},
|
|
294
|
+
"required": ["group_id", "user_id"],
|
|
295
|
+
"description": "Poke a group member (OneBot action name).",
|
|
296
|
+
},
|
|
297
|
+
"set_friend_remark": {
|
|
298
|
+
"params": ["user_id", "remark"],
|
|
299
|
+
"example": {"user_id": "12345678", "remark": "Friend Remark"},
|
|
300
|
+
"required": ["user_id", "remark"],
|
|
301
|
+
"description": "Set a friend's remark (OneBot action name).",
|
|
302
|
+
},
|
|
303
|
+
# New internal actions (message content browsing + schema description)
|
|
304
|
+
# ------------------------------------------------------------------
|
|
305
|
+
"list_message_content": {
|
|
306
|
+
"params": ["message_id", "group_id", "user_id"],
|
|
307
|
+
"example": {"message_id": "987654321", "group_id": "123456"},
|
|
308
|
+
"required": ["message_id"],
|
|
309
|
+
"description": "List available content types for a message (metadata, text, image, file, etc.).",
|
|
310
|
+
},
|
|
311
|
+
"get_message_content": {
|
|
312
|
+
"params": ["message_id", "content", "group_id", "user_id"],
|
|
313
|
+
"example": {"message_id": "987654321", "content": "image", "group_id": "123456"},
|
|
314
|
+
"required": ["message_id", "content"],
|
|
315
|
+
"description": "Get specific content from a message. Content: metadata, text, image, file, video, record, forward.",
|
|
316
|
+
},
|
|
317
|
+
"describe_action": {
|
|
318
|
+
"params": ["action"],
|
|
319
|
+
"example": {"action": "napcat_send_group_msg"},
|
|
320
|
+
"required": ["action"],
|
|
321
|
+
"description": "Get schema description for an action (params, example, required, description).",
|
|
322
|
+
},
|
|
323
|
+
# ------------------------------------------------------------------
|
|
324
|
+
# Multi-type send/reply actions (send/reply text|image|file|cqcode|at|json)
|
|
325
|
+
# ------------------------------------------------------------------
|
|
326
|
+
"send_group_text": {
|
|
327
|
+
"params": ["group_id"],
|
|
328
|
+
"example": {"group_id": "123456", "text": "hello"},
|
|
329
|
+
"required": ["group_id"],
|
|
330
|
+
"description": "Send plain text to a group. Write raw text to the file.",
|
|
331
|
+
},
|
|
332
|
+
"send_group_image": {
|
|
333
|
+
"params": ["group_id"],
|
|
334
|
+
"example": "/path/to/image.jpg",
|
|
335
|
+
"required": ["group_id"],
|
|
336
|
+
"description": "Send an image to a group. Write a local file path.",
|
|
337
|
+
},
|
|
338
|
+
"send_group_file": {
|
|
339
|
+
"params": ["group_id"],
|
|
340
|
+
"example": "/path/to/file.txt",
|
|
341
|
+
"required": ["group_id"],
|
|
342
|
+
"description": "Upload a file to a group. Write a local file path.",
|
|
343
|
+
},
|
|
344
|
+
"send_group_cqcode": {
|
|
345
|
+
"params": ["group_id"],
|
|
346
|
+
"example": "[CQ:at,qq=123] hello",
|
|
347
|
+
"required": ["group_id"],
|
|
348
|
+
"description": "Send CQ code string to a group. NapCat parses CQ codes.",
|
|
349
|
+
},
|
|
350
|
+
"send_group_at": {
|
|
351
|
+
"params": ["group_id", "qq"],
|
|
352
|
+
"example": {"group_id": "123456", "qq": "456", "text": "hello"},
|
|
353
|
+
"required": ["group_id", "qq"],
|
|
354
|
+
"description": "@someone in a group with optional text.",
|
|
355
|
+
},
|
|
356
|
+
"send_group_json": {
|
|
357
|
+
"params": ["group_id", "message"],
|
|
358
|
+
"example": {"group_id": "123456", "message": [{"type": "text", "data": {"text": "hi"}}]},
|
|
359
|
+
"required": ["group_id", "message"],
|
|
360
|
+
"description": "Send full message segments JSON to a group.",
|
|
361
|
+
},
|
|
362
|
+
"send_private_text": {
|
|
363
|
+
"params": ["user_id"],
|
|
364
|
+
"example": {"user_id": "12345678", "text": "hello"},
|
|
365
|
+
"required": ["user_id"],
|
|
366
|
+
"description": "Send plain text to a friend. Write raw text to the file.",
|
|
367
|
+
},
|
|
368
|
+
"send_private_image": {
|
|
369
|
+
"params": ["user_id"],
|
|
370
|
+
"example": "/path/to/image.jpg",
|
|
371
|
+
"required": ["user_id"],
|
|
372
|
+
"description": "Send an image to a friend. Write a local file path.",
|
|
373
|
+
},
|
|
374
|
+
"send_private_file": {
|
|
375
|
+
"params": ["user_id"],
|
|
376
|
+
"example": "/path/to/file.txt",
|
|
377
|
+
"required": ["user_id"],
|
|
378
|
+
"description": "Upload a file to a friend. Write a local file path.",
|
|
379
|
+
},
|
|
380
|
+
"send_private_cqcode": {
|
|
381
|
+
"params": ["user_id"],
|
|
382
|
+
"example": "[CQ:face,id=14]",
|
|
383
|
+
"required": ["user_id"],
|
|
384
|
+
"description": "Send CQ code string to a friend.",
|
|
385
|
+
},
|
|
386
|
+
"send_private_at": {
|
|
387
|
+
"params": ["user_id", "qq"],
|
|
388
|
+
"example": {"user_id": "12345678", "qq": "456", "text": "hello"},
|
|
389
|
+
"required": ["user_id", "qq"],
|
|
390
|
+
"description": "@someone in a private chat with optional text.",
|
|
391
|
+
},
|
|
392
|
+
"send_private_json": {
|
|
393
|
+
"params": ["user_id", "message"],
|
|
394
|
+
"example": {"user_id": "12345678", "message": [{"type": "text", "data": {"text": "hi"}}]},
|
|
395
|
+
"required": ["user_id", "message"],
|
|
396
|
+
"description": "Send full message segments JSON to a friend.",
|
|
397
|
+
},
|
|
398
|
+
"reply_group_text": {
|
|
399
|
+
"params": ["group_id", "message_id"],
|
|
400
|
+
"example": {"group_id": "123456", "message_id": "987654321", "text": "reply"},
|
|
401
|
+
"required": ["group_id", "message_id"],
|
|
402
|
+
"description": "Reply to a group message with plain text.",
|
|
403
|
+
},
|
|
404
|
+
"reply_group_image": {
|
|
405
|
+
"params": ["group_id", "message_id"],
|
|
406
|
+
"example": {"group_id": "123456", "message_id": "987654321"},
|
|
407
|
+
"required": ["group_id", "message_id"],
|
|
408
|
+
"description": "Reply to a group message with an image. Write a local file path.",
|
|
409
|
+
},
|
|
410
|
+
"reply_group_file": {
|
|
411
|
+
"params": ["group_id", "message_id"],
|
|
412
|
+
"example": {"group_id": "123456", "message_id": "987654321"},
|
|
413
|
+
"required": ["group_id", "message_id"],
|
|
414
|
+
"description": "Upload a file as reply (same as send file). Write a local file path.",
|
|
415
|
+
},
|
|
416
|
+
"reply_group_cqcode": {
|
|
417
|
+
"params": ["group_id", "message_id"],
|
|
418
|
+
"example": {"group_id": "123456", "message_id": "987654321"},
|
|
419
|
+
"required": ["group_id", "message_id"],
|
|
420
|
+
"description": "Reply to a group message with CQ code string.",
|
|
421
|
+
},
|
|
422
|
+
"reply_group_at": {
|
|
423
|
+
"params": ["group_id", "message_id", "qq"],
|
|
424
|
+
"example": {"group_id": "123456", "message_id": "987654321", "qq": "456", "text": "hi"},
|
|
425
|
+
"required": ["group_id", "message_id", "qq"],
|
|
426
|
+
"description": "Reply to a group message by @-ing someone.",
|
|
427
|
+
},
|
|
428
|
+
"reply_group_json": {
|
|
429
|
+
"params": ["group_id", "message_id", "message"],
|
|
430
|
+
"example": {"group_id": "123456", "message_id": "987654321", "message": [{"type": "text", "data": {"text": "hi"}}]},
|
|
431
|
+
"required": ["group_id", "message_id", "message"],
|
|
432
|
+
"description": "Reply to a group message with full segments JSON.",
|
|
433
|
+
},
|
|
434
|
+
"reply_private_text": {
|
|
435
|
+
"params": ["user_id", "message_id"],
|
|
436
|
+
"example": {"user_id": "12345678", "message_id": "987654321", "text": "reply"},
|
|
437
|
+
"required": ["user_id", "message_id"],
|
|
438
|
+
"description": "Reply to a friend message with plain text.",
|
|
439
|
+
},
|
|
440
|
+
"reply_private_image": {
|
|
441
|
+
"params": ["user_id", "message_id"],
|
|
442
|
+
"example": {"user_id": "12345678", "message_id": "987654321"},
|
|
443
|
+
"required": ["user_id", "message_id"],
|
|
444
|
+
"description": "Reply to a friend message with an image.",
|
|
445
|
+
},
|
|
446
|
+
"reply_private_file": {
|
|
447
|
+
"params": ["user_id", "message_id"],
|
|
448
|
+
"example": {"user_id": "12345678", "message_id": "987654321"},
|
|
449
|
+
"required": ["user_id", "message_id"],
|
|
450
|
+
"description": "Upload a file as reply (same as send file). Write a local file path.",
|
|
451
|
+
},
|
|
452
|
+
"reply_private_cqcode": {
|
|
453
|
+
"params": ["user_id", "message_id"],
|
|
454
|
+
"example": {"user_id": "12345678", "message_id": "987654321"},
|
|
455
|
+
"required": ["user_id", "message_id"],
|
|
456
|
+
"description": "Reply to a friend message with CQ code string.",
|
|
457
|
+
},
|
|
458
|
+
"reply_private_at": {
|
|
459
|
+
"params": ["user_id", "message_id", "qq"],
|
|
460
|
+
"example": {"user_id": "12345678", "message_id": "987654321", "qq": "456"},
|
|
461
|
+
"required": ["user_id", "message_id", "qq"],
|
|
462
|
+
"description": "Reply to a friend message by @-ing someone.",
|
|
463
|
+
},
|
|
464
|
+
"reply_private_json": {
|
|
465
|
+
"params": ["user_id", "message_id", "message"],
|
|
466
|
+
"example": {"user_id": "12345678", "message_id": "987654321", "message": [{"type": "text", "data": {"text": "hi"}}]},
|
|
467
|
+
"required": ["user_id", "message_id", "message"],
|
|
468
|
+
"description": "Reply to a friend message with full segments JSON.",
|
|
469
|
+
},
|
|
470
|
+
}
|