@alemonjs/qq-bot 0.0.8 → 0.0.9

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/lib/api.d.ts ADDED
@@ -0,0 +1,847 @@
1
+ import * as axios from 'axios';
2
+ import { AxiosRequestConfig } from 'axios';
3
+ import { ApiRequestData, FileType } from './typing.js';
4
+ import FormData from 'form-data';
5
+
6
+ declare class QQBotAPI {
7
+ #private;
8
+ /**
9
+ * qq机器人
10
+ */
11
+ BOTS_API_RUL: string;
12
+ /**
13
+ * qq群 沙河接口
14
+ */
15
+ API_URL_SANDBOX: string;
16
+ /**
17
+ * qq群
18
+ */
19
+ API_URL: string;
20
+ /**
21
+ * 得到鉴权
22
+ * @param appId
23
+ * @param clientSecret
24
+ * @param url
25
+ * @returns
26
+ */
27
+ getAuthentication(app_id: string, clientSecret: string): Promise<axios.AxiosResponse<any, any>>;
28
+ /**
29
+ * group
30
+ * @param config
31
+ * @returns
32
+ */
33
+ groupService(options: AxiosRequestConfig): Promise<axios.AxiosResponse<any, any>>;
34
+ /**
35
+ * guild
36
+ * @param opstion
37
+ * @returns
38
+ */
39
+ guildServer(opstion: AxiosRequestConfig): Promise<axios.AxiosResponse<any, any>>;
40
+ /**
41
+ * 得到鉴权
42
+ * @returns
43
+ */
44
+ gateway(): Promise<any>;
45
+ /**
46
+ * 发送私聊消息
47
+ * @param openid
48
+ * @param content
49
+ * @param msg_id
50
+ * @returns
51
+ * 0 文本 1 图文 2 md 3 ark 4 embed
52
+ */
53
+ usersOpenMessages(openid: string, data: ApiRequestData, _msg_id?: string): Promise<{
54
+ id: string;
55
+ timestamp: number;
56
+ }>;
57
+ /**
58
+ * 得到消息序列
59
+ * @param MessageId
60
+ * @returns
61
+ */
62
+ getMessageSeq(MessageId: string): number;
63
+ /**
64
+ * 发送群聊消息
65
+ * @param group_openid
66
+ * @param content
67
+ * @param msg_id
68
+ * @returns
69
+ */
70
+ groupOpenMessages(group_openid: string, data: ApiRequestData): Promise<{
71
+ id: string;
72
+ timestamp: number;
73
+ }>;
74
+ /**
75
+ * 发送私聊富媒体文件
76
+ * @param openid
77
+ * @param content
78
+ * @param file_type
79
+ * @returns
80
+ * 1 图文 2 视频 3 语言 4 文件
81
+ * 图片:png/jpg,视频:mp4,语音:silk
82
+ */
83
+ postRichMediaByUsers(openid: string, data: {
84
+ srv_send_msg?: boolean;
85
+ file_type: FileType;
86
+ url?: string;
87
+ file_data?: any;
88
+ }): Promise<{
89
+ file_uuid: string;
90
+ file_info: string;
91
+ ttl: number;
92
+ }>;
93
+ /**
94
+ * 发送私聊富媒体文件
95
+ * @param openid
96
+ * @param content
97
+ * @param file_type
98
+ * @returns
99
+ * 1 图文 2 视频 3 语言 4 文件
100
+ * 图片:png/jpg,视频:mp4,语音:silk
101
+ */
102
+ userFiles(openid: string, data: {
103
+ srv_send_msg: boolean;
104
+ file_type: FileType;
105
+ url: string;
106
+ file_data?: any;
107
+ }): Promise<{
108
+ file_uuid: string;
109
+ file_info: string;
110
+ ttl: number;
111
+ }>;
112
+ /**
113
+ * 发送群里文件
114
+ * @param openid
115
+ * @param content
116
+ * @param file_type
117
+ * @returns
118
+ * 1 图文 2 视频 3 语言 4 文件
119
+ * 图片:png/jpg,视频:mp4,语音:silk
120
+ */
121
+ postRichMediaByGroup(openid: string, data: {
122
+ srv_send_msg?: boolean;
123
+ file_type: FileType;
124
+ url?: string;
125
+ file_data?: any;
126
+ }): Promise<{
127
+ file_uuid: string;
128
+ file_info: string;
129
+ ttl: number;
130
+ }>;
131
+ /**
132
+ *
133
+ * @param openid
134
+ * @param data
135
+ * @returns
136
+ */
137
+ groupsFiles(openid: string, data: {
138
+ srv_send_msg?: boolean;
139
+ file_type: FileType;
140
+ url?: string;
141
+ file_data?: any;
142
+ }): Promise<{
143
+ file_uuid: string;
144
+ file_info: string;
145
+ ttl: number;
146
+ }>;
147
+ /**
148
+ * 创建模板
149
+ * *********
150
+ * 使用该方法,你需要申请模板Id
151
+ * 并设置markdown源码为{{.text_0}}{{.text_1}}
152
+ * {{.text_2}}{{.text_3}}{{.text_4}}{{.text_5}}
153
+ * {{.text_6}}{{.text_7}}{{.text_8}}{{.text_9}}
154
+ * 当前,你也可以传递回调对key和values进行休整
155
+ * @param custom_template_id
156
+ * @param mac 默认 9
157
+ * @param callBack 默认 (key,values)=>({key,values})
158
+ * @returns
159
+ */
160
+ createTemplate(custom_template_id: string, mac?: number, callBack?: (key: string, values: string[]) => {
161
+ key: string;
162
+ values: string[];
163
+ }): {
164
+ size: number;
165
+ text: (value: string, change?: boolean) => void;
166
+ prefix: (start: string, label: string) => void;
167
+ suffix: ({ value, enter, reply, change, end }: {
168
+ value: any;
169
+ enter?: boolean | undefined;
170
+ reply?: boolean | undefined;
171
+ change?: boolean | undefined;
172
+ end?: string | undefined;
173
+ }) => void;
174
+ button: ({ label, value, start, end, enter, reply, change }: {
175
+ label: any;
176
+ value: any;
177
+ start?: string | undefined;
178
+ end?: string | undefined;
179
+ enter?: boolean | undefined;
180
+ reply?: boolean | undefined;
181
+ change?: boolean | undefined;
182
+ }) => void;
183
+ code: (val: string) => void;
184
+ getParam: () => {
185
+ msg_type: number;
186
+ markdown: {
187
+ custom_template_id: string;
188
+ params: {
189
+ key: string;
190
+ values: string[];
191
+ }[];
192
+ };
193
+ };
194
+ };
195
+ /**
196
+ *
197
+ * @param openid
198
+ * @param message_id
199
+ * @returns
200
+ */
201
+ userMessageDelete(openid: string, message_id: string): Promise<any>;
202
+ /**
203
+ *
204
+ * @param group_openid
205
+ * @param message_id
206
+ * @returns
207
+ */
208
+ grouMessageDelte(group_openid: string, message_id: string): Promise<any>;
209
+ /**
210
+ * 创建form
211
+ * @param image
212
+ * @param msg_id
213
+ * @param content
214
+ * @param name
215
+ * @returns
216
+ */
217
+ createFrom(image: Buffer, msg_id: string, content: any, Name?: string): Promise<false | FormData>;
218
+ /**
219
+ * ************
220
+ * 消息-图片接口
221
+ * ***********
222
+ */
223
+ /**
224
+ * 发送buffer图片
225
+ * @param id 私信传频道id,公信传子频道id
226
+ * @param message {消息编号,图片,内容}
227
+ * @param isGroup 是否是群聊
228
+ * @returns
229
+ */
230
+ postImage(channel_id: string, message: {
231
+ msg_id: string;
232
+ image: Buffer;
233
+ content?: string;
234
+ name?: string;
235
+ }): Promise<any>;
236
+ /**
237
+ * 私聊发送buffer图片
238
+ * @param id 私信传频道id,公信传子频道id
239
+ * @param message {消息编号,图片,内容}
240
+ * @returns
241
+ */
242
+ postDirectImage(guild_id: string, message: {
243
+ msg_id: string;
244
+ image: Buffer;
245
+ content?: string;
246
+ name?: string;
247
+ }): Promise<any>;
248
+ /**
249
+ * ********
250
+ * 用户api
251
+ * *******
252
+ */
253
+ /**
254
+ * 获取用户详情
255
+ * @param message
256
+ * @returns
257
+ */
258
+ usersMe(): Promise<any>;
259
+ /**
260
+ * 获取用户频道列表
261
+ * @param message
262
+ * @returns
263
+ */
264
+ usersMeGuilds(params: {
265
+ before: string;
266
+ after: string;
267
+ limit: number;
268
+ }): Promise<any>;
269
+ /**
270
+ * **********
271
+ * 频道api
272
+ * **********
273
+ */
274
+ /**
275
+ * 获取频道详细
276
+ * @param guild_id
277
+ * @returns
278
+ */
279
+ guilds(guild_id: string): Promise<any>;
280
+ /**
281
+ * ************
282
+ * 子频道api
283
+ * ***********
284
+ */
285
+ /**
286
+ * 获取子频道列表
287
+ * @param guild_id
288
+ * @returns
289
+ */
290
+ guildsChannels(guild_id: string): Promise<any>;
291
+ /**
292
+ * 获取子频道详情
293
+ * @param channel_id
294
+ * @returns
295
+ */
296
+ channels(channel_id: string): Promise<any>;
297
+ /**
298
+ * 创建子频道
299
+ * @param guild_id
300
+ * @returns
301
+ */
302
+ guildsChannelsCreate(guild_id: string, data: {
303
+ name: string;
304
+ type: number;
305
+ sub_type: number;
306
+ position: number;
307
+ parent_id: string;
308
+ private_type: number;
309
+ private_user_ids: string[];
310
+ speak_permission: number;
311
+ application_id: string;
312
+ }): Promise<any>;
313
+ /**
314
+ * 创建子频道
315
+ * @param channel_id
316
+ * @returns
317
+ */
318
+ guildsChannelsUpdate(channel_id: string, data: {
319
+ name: string;
320
+ position: number;
321
+ parent_id: string;
322
+ private_type: number;
323
+ speak_permission: number;
324
+ }): Promise<any>;
325
+ /**
326
+ * 删除子频道
327
+ * @param channel_id
328
+ * @param data
329
+ * @returns
330
+ */
331
+ guildsChannelsdelete(channel_id: string, data: {
332
+ name: string;
333
+ position: number;
334
+ parent_id: string;
335
+ private_type: number;
336
+ speak_permission: number;
337
+ }): Promise<any>;
338
+ /**
339
+ * 获取在线成员数
340
+ * @param channel_id
341
+ * @returns
342
+ */
343
+ channelsChannelOnlineNums(channel_id: string): Promise<any>;
344
+ /**
345
+ * *********
346
+ * 成员api
347
+ * *********
348
+ */
349
+ /**
350
+ * 获取频道成员列表
351
+ * @param guild_id
352
+ * @returns
353
+ */
354
+ guildsMembers(guild_id: string, params: {
355
+ after: string;
356
+ limit: number;
357
+ }): Promise<any>;
358
+ /**
359
+ * 获取频道身份组成员列表
360
+ * @param guild_id
361
+ * @param role_id
362
+ * @param params
363
+ * @returns
364
+ */
365
+ guildsRolesMembers(guild_id: string, role_id: string, params: {
366
+ start_index: string;
367
+ limit: number;
368
+ }): Promise<any>;
369
+ /**
370
+ * 获取成员详情
371
+ * @param guild_id
372
+ * @param user_id
373
+ * @returns
374
+ */
375
+ guildsMembersMessage(guild_id: string, user_id: string): Promise<any>;
376
+ /**
377
+ * 删除频道成员
378
+ * @param guild_id
379
+ * @param user_id
380
+ * @returns
381
+ */
382
+ guildsMembersDelete(guild_id: string, user_id: string): Promise<any>;
383
+ /**
384
+ * 获取指定消息
385
+ * @param channel_id
386
+ * @param message_id
387
+ * @returns
388
+ */
389
+ channelsMessages(channel_id: string, message_id: string): Promise<any>;
390
+ /**
391
+ * 发送消息
392
+ * @param channel_id
393
+ * @param message_id
394
+ * @param data
395
+ * @returns
396
+ */
397
+ channelsMessagesPost(channel_id: string, data: {
398
+ content?: string;
399
+ embed?: any;
400
+ ark?: any;
401
+ message_reference?: any;
402
+ image?: string;
403
+ msg_id?: string;
404
+ event_id?: string;
405
+ markdown?: any;
406
+ }): Promise<any>;
407
+ /**
408
+ * 撤回消息
409
+ * @param channel_id
410
+ * @param message_id
411
+ * @param hidetip
412
+ * @returns
413
+ */
414
+ channelsMessagesDelete(channel_id: string, message_id: string, hidetip?: boolean): Promise<any>;
415
+ /**
416
+ * ***********
417
+ * 频道身份api
418
+ * ***********
419
+ */
420
+ /**
421
+ * 获取频道身份组列表
422
+ * @param guild_id 频道id
423
+ * @returns
424
+ */
425
+ guildsRoles(guild_id: string): Promise<any>;
426
+ /**
427
+ * 创建频道身份组
428
+ * @param guild_id 频道id
429
+ * @param {object} data 参数
430
+ * @param {object?} data.name 身份组名称
431
+ * @param {object?} data.color ARGB 的 HEX 十六进制颜色值转换后的十进制数值
432
+ * @param {object?} data.hoist 在成员列表中单独展示: 0-否, 1-是
433
+ * @returns
434
+ */
435
+ guildsRolesPost(guild_id: string, data: {
436
+ name?: string;
437
+ color?: number;
438
+ hoist?: 0 | 1;
439
+ }): Promise<any>;
440
+ /**
441
+ * 修改频道身份组
442
+ * @param guild_id 频道id
443
+ * @param {object} data 参数
444
+ * @param {object?} data.name 身份组名称
445
+ * @param {object?} data.color ARGB 的 HEX 十六进制颜色值转换后的十进制数值
446
+ * @param {object?} data.hoist 在成员列表中单独展示: 0-否, 1-是
447
+ * @returns
448
+ */
449
+ guildsRolesPatch(guild_id: string, role_id: string, data: {
450
+ name?: string;
451
+ color?: number;
452
+ hoist?: 0 | 1;
453
+ }): Promise<any>;
454
+ /**
455
+ * 删除频道身份组
456
+ * @param guild_id 频道id
457
+ * @param role_id 身份组id
458
+ */
459
+ guildsRolesDelete(guild_id: string, role_id: string): Promise<any>;
460
+ /**
461
+ * 将成员添加到频道身份组
462
+ * @param guild_id 频道id
463
+ * @param channel_id 子频道id
464
+ * @param user_id 用户id
465
+ * @param role_id 身份组id
466
+ * @returns
467
+ */
468
+ guildsRolesMembersPut(guild_id: string, channel_id: string, user_id: string, role_id: string): Promise<any>;
469
+ /**
470
+ * 将成员从频道身份组移除
471
+ * @param guild_id 频道id
472
+ * @param channel_id 子频道id
473
+ * @param user_id 用户id
474
+ * @param role_id 身份组id
475
+ * @returns
476
+ */
477
+ guildsRolesMembersDelete(guild_id: string, channel_id: string, user_id: string, role_id: string): Promise<any>;
478
+ /**
479
+ * **********
480
+ * 子频道权限api
481
+ * **********
482
+ */
483
+ /**
484
+ * 获取子频道用户权限
485
+ * @param channel_id 子频道id
486
+ * @param user_id 用户id
487
+ */
488
+ channelsPermissions(channel_id: string, user_id: string): Promise<any>;
489
+ /**
490
+ * 修改子频道用户权限
491
+ * @param channel_id 子频道id
492
+ * @param user_id 用户id
493
+ * @param 参数包括add和remove两个字段分别表示授予的权限以及删除的权限。要授予用户权限即把add对应位置 1,删除用户权限即把remove对应位置 1。当两个字段同一位都为 1,表现为删除权限。
494
+ */
495
+ channelsPermissionsPut(channel_id: string, user_id: string, add: string, remove: string): Promise<any>;
496
+ /**
497
+ * *******
498
+ * 消息api
499
+ * ********
500
+ */
501
+ /**
502
+ * ************
503
+ * 消息频率api
504
+ * **********
505
+ */
506
+ /**
507
+ * 查询频道消息频率限制
508
+ * @param guild_id 频道id
509
+ * @returns
510
+ */
511
+ guildsMessageSetting(guild_id: string): Promise<any>;
512
+ /**
513
+ * ***********
514
+ * 私信api
515
+ * **********
516
+ */
517
+ /**
518
+ * 创建私信会话
519
+ * @param recipient_id 接收者 id
520
+ * @param source_guild_id 源频道 id
521
+ * @returns
522
+ */
523
+ usersMeDms(): Promise<any>;
524
+ /**
525
+ * 发送私信
526
+ * @param guild_id
527
+ * @returns
528
+ */
529
+ dmsMessage(guild_id: string, data: {
530
+ content?: string;
531
+ embed?: any;
532
+ ark?: any;
533
+ message_reference?: any;
534
+ image?: string;
535
+ msg_id?: string;
536
+ event_id?: string;
537
+ markdown?: any;
538
+ }): Promise<any>;
539
+ /**
540
+ * 撤回私信
541
+ * @param guild_id
542
+ * @param data
543
+ * @returns
544
+ */
545
+ dmsMessageDelete(guild_id: string, message_id: string, hidetip?: boolean): Promise<any>;
546
+ /**
547
+ * *********
548
+ * 禁言api
549
+ * *******
550
+ */
551
+ /**
552
+ * 全体禁言(非管理员)
553
+ * @param guild_id 频道id
554
+ * @param data { mute_end_timestamp:禁言结束时间戳, mute_seconds:禁言时长 } 两个参数必须传一个 优先级 mute_end_timestamp > mute_seconds
555
+ * 将mute_end_timestamp或mute_seconds传值为字符串'0',则表示解除全体禁言
556
+ */
557
+ guildsMuteAll(guild_id: string, data: {
558
+ mute_end_timestamp?: string;
559
+ mute_seconds?: string;
560
+ }): Promise<any>;
561
+ /**
562
+ * 频道指定成员禁言
563
+ * @param guild_id 频道id
564
+ * @param user_id 用户id
565
+ * @param data { mute_end_timestamp:禁言结束时间戳, mute_seconds:禁言时长 } 两个参数必须传一个 优先级 mute_end_timestamp > mute_seconds
566
+ * 将mute_end_timestamp或mute_seconds传值为字符串'0',则表示解除禁言
567
+ * @returns
568
+ */
569
+ guildsMemberMute(guild_id: string, user_id: string, data: {
570
+ mute_end_timestamp?: string;
571
+ mute_seconds?: string;
572
+ }): Promise<any>;
573
+ /**
574
+ * 频道批量禁言
575
+ * @param guild_id 频道id
576
+ * @param data { mute_end_timestamp:禁言结束时间戳, mute_seconds:禁言时长, user_ids:用户id数组 } 两个参数必须传一个 优先级 mute_end_timestamp > mute_seconds
577
+ * 将mute_end_timestamp或mute_seconds传值为字符串'0',则表示解除禁言
578
+ */
579
+ guildsMute(guild_id: string, data: {
580
+ mute_end_timestamp?: string;
581
+ mute_seconds?: string;
582
+ user_ids: string[];
583
+ }): Promise<any>;
584
+ /**
585
+ * *******
586
+ * 公告api
587
+ * *******
588
+ */
589
+ /**
590
+ * 创建频道公告
591
+ * 公告类型分为 消息类型的频道公告 和 推荐子频道类型的频道公告
592
+ * 详见 https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/announces/post_guild_announces.html#%E5%8A%9F%E8%83%BD%E6%8F%8F%E8%BF%B0
593
+ * @param guild_id 频道id
594
+ * @param data { message_id:消息id, channel_id:频道id, announces_type:公告类型, recommend_channels:推荐频道id数组 }
595
+ * @param channel_id 子频道id 消息id存在时必须传
596
+ * @param announces_type 0:成员公告 1:欢迎公告 默认为 0
597
+ * @param recommend_channels 推荐频道id数组 "recommend_channels": [{ "channel_id": "xxxx","introduce": "推荐语" }]
598
+ * @returns 返回Announces 对象 (https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/announces/model.html#Announces)
599
+ */
600
+ guildsAnnounces(guild_id: string, data: {
601
+ message_id?: string;
602
+ channel_id?: string;
603
+ announces_type?: 0 | 1;
604
+ recommend_channels?: string[];
605
+ }): Promise<any>;
606
+ /**
607
+ * 删除频道公告
608
+ * @param guild_id 频道id
609
+ * @param message_id 消息id message_id 有值时,会校验 message_id 合法性,若不校验校验 message_id,请将 message_id 设置为 all
610
+ * @returns
611
+ */
612
+ guildsAnnouncesDelete(guild_id: string, message_id: string): Promise<any>;
613
+ /**
614
+ * **********
615
+ * 精华消息api
616
+ * **********
617
+ */
618
+ /**
619
+ * 添加精华消息
620
+ * @param channel_id 频道id
621
+ * @param message_id 消息id
622
+ * @returns 返回 PinsMessage对象 { "guild_id": "xxxxxx", "channel_id": "xxxxxx", "message_ids": ["xxxxx"]}
623
+ * @returns message_ids 为当前请求后子频道内所有精华消息 message_id 数组
624
+ */
625
+ channelsPinsPut(channel_id: string, message_id: string): Promise<any>;
626
+ /**
627
+ * 删除精华消息
628
+ * @param channel_id 子频道id
629
+ * @param message_id 消息id
630
+ * 删除子频道内全部精华消息,请将 message_id 设置为 all
631
+ * @returns
632
+ */
633
+ channelsPinsDelete(channel_id: string, message_id: string): Promise<any>;
634
+ /**
635
+ * 获取精华消息
636
+ * @param channel_id 子频道id
637
+ * @returns 返回 PinsMessage对象 { "guild_id": "xxxxxx", "channel_id": "xxxxxx", "message_ids": ["xxxxx"]}
638
+ * @returns message_ids 为当前请求后子频道内所有精华消息 message_id 数组
639
+ */
640
+ channelsPins(channel_id: string): Promise<any>;
641
+ /**
642
+ * ********
643
+ * 日程api
644
+ * *******
645
+ */
646
+ /**
647
+ * 获取频道日程列表
648
+ * @param channel_id 子频道id
649
+ * @returns 返回 Schedule 对象数组(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/schedule/model.html#schedule)
650
+ */
651
+ channelsSchedules(channel_id: string): Promise<any>;
652
+ /**
653
+ * 获取频道日程详情
654
+ * @param channel_id 子频道id
655
+ * @param schedule_id 日程id
656
+ * @returns 返回 Schedule 对象(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/schedule/model.html#schedule)
657
+ */
658
+ channelsSchedulesSchedule(channel_id: string, schedule_id: string): Promise<any>;
659
+ /**
660
+ * 创建频道日程
661
+ * @param channel_id 子频道id
662
+ * @param name 日程名称
663
+ * @param description 日程描述
664
+ * @param start_timestamp 日程开始时间戳
665
+ * @param end_timestamp 日程结束时间戳
666
+ * @param jump_channel_id 日程开始时跳转的子频道id
667
+ * @param remind_type 日程提醒类型
668
+ * 0 不提醒
669
+ * 1 开始时提醒
670
+ * 2 开始前 5 分钟提醒
671
+ * 3 开始前 15 分钟提醒
672
+ * 4 开始前 30 分钟提醒
673
+ * 5 开始前 60 分钟提醒
674
+ * @returns 返回 Schedule 对象(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/schedule/model.html#schedule)
675
+ */
676
+ channelsSchedulesPost(channel_id: string, data: {
677
+ schedule: {
678
+ name: string;
679
+ description?: string;
680
+ start_timestamp: string;
681
+ end_timestamp: string;
682
+ jump_channel_id: string;
683
+ remind_type: number;
684
+ };
685
+ }): Promise<any>;
686
+ /**
687
+ * 修改频道日程
688
+ * @param channel_id 子频道id
689
+ * @param schedule_id 日程id
690
+ * @param name 日程名称
691
+ * @param description 日程描述
692
+ * @param start_timestamp 日程开始时间戳
693
+ * @param end_timestamp 日程结束时间戳
694
+ * @param jump_channel_id 日程开始时跳转的子频道id
695
+ * @param remind_type 日程提醒类型
696
+ * 0 不提醒
697
+ * 1 开始时提醒
698
+ * 2 开始前 5 分钟提醒
699
+ * 3 开始前 15 分钟提醒
700
+ * 4 开始前 30 分钟提醒
701
+ * 5 开始前 60 分钟提醒
702
+ * @returns 返回 Schedule 对象(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/schedule/model.html#schedule)
703
+ */
704
+ channelsSchedulesSchedulePatch(channel_id: string, schedule_id: string, data: {
705
+ schedule: {
706
+ name: string;
707
+ description?: string;
708
+ start_timestamp: string;
709
+ end_timestamp: string;
710
+ jump_channel_id: string;
711
+ remind_type: number;
712
+ };
713
+ }): Promise<any>;
714
+ /**
715
+ * 删除频道日程
716
+ * @param channel_id 子频道id
717
+ * @param schedule_id 日程id
718
+ * @returns
719
+ */
720
+ channelsSchedulesScheduleDelete(channel_id: string, schedule_id: string): Promise<any>;
721
+ /**
722
+ * ***********
723
+ * 表情表态api
724
+ * ***********
725
+ */
726
+ /**
727
+ * 机器人发表表情表态
728
+ * @param channel_id 子频道id
729
+ * @param message_id 消息id
730
+ * @param type 表情类型 1:系统表情 2:emoji表情
731
+ * @param id 表情id 参考https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#Emoji%20%E5%88%97%E8%A1%A8
732
+ * @returns
733
+ */
734
+ channelsMessagesReactionsPut(channel_id: string, message_id: string, type: 1 | 2, id: string): Promise<any>;
735
+ /**
736
+ * 删除机器人发表的表情表态
737
+ * @param channel_id 子频道id
738
+ * @param message_id 消息id
739
+ * @param type 表情类型 1:系统表情 2:emoji表情
740
+ * @param id 表情id 参考https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#Emoji%20%E5%88%97%E8%A1%A8
741
+ * @returns
742
+ */
743
+ channelsMessagesReactionsDelete(channel_id: string, message_id: string, type: 1 | 2, id: string): Promise<any>;
744
+ /**
745
+ * 获取消息表情表态的用户列表
746
+ * @param channel_id 子频道id
747
+ * @param message_id 消息id
748
+ * @param type 表情类型 1:系统表情 2:emoji表情
749
+ * @param id 表情id 参考https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#Emoji%20%E5%88%97%E8%A1%A8
750
+ * @param {object} data
751
+ * @param {object} data.cookie 返回的cookie 第一次请求不传,后续请求传上次返回的cookie
752
+ * @param {object} data.limit 返回的用户数量 默认20 最大50
753
+ * @returns data:{ users:User[], cookie:string,is_end:true|false }
754
+ */
755
+ channelsMessagesReactionsUsers(channel_id: string, message_id: string, type: 1 | 2, id: string, data: {
756
+ cookie?: string;
757
+ limit?: number;
758
+ }): Promise<any>;
759
+ /**
760
+ * ***********
761
+ * 音频api
762
+ * 音频接口:仅限音频类机器人才能使用,后续会根据机器人类型自动开通接口权限,现如需调用,需联系平台申请权限
763
+ * **********
764
+ */
765
+ /**
766
+ * 音频控制
767
+ * @param channel_id 子频道id
768
+ * @param audio_url 音频url status为0时传
769
+ * @param status 0:开始 1:暂停 2:继续 3:停止
770
+ * @param text 状态文本(比如:简单爱-周杰伦),可选,status为0时传,其他操作不传
771
+ * @returns
772
+ */
773
+ channelsAudioPost(channel_id: string, data: {
774
+ audio_url?: string;
775
+ text?: string;
776
+ status: 0 | 1 | 2 | 3;
777
+ }): Promise<any>;
778
+ /**
779
+ * 机器人上麦
780
+ * @param channel_id 语音子频道id
781
+ * @returns {}
782
+ */
783
+ channelsMicPut(channel_id: string): Promise<any>;
784
+ /**
785
+ * 机器人下麦
786
+ * @param channel_id 语音子频道id
787
+ * @returns {}
788
+ */
789
+ channelsMicDelete(channel_id: string): Promise<any>;
790
+ /**
791
+ * **********
792
+ * 帖子api
793
+ * 注意
794
+ * 公域机器人暂不支持申请,仅私域机器人可用,选择私域机器人后默认开通。
795
+ * 注意: 开通后需要先将机器人从频道移除,然后重新添加,方可生效。
796
+ * **********
797
+ */
798
+ /**
799
+ * 获取帖子列表
800
+ * @param channel_id 子频道id
801
+ * @returns {threads:Thread[],is_finish:0|1}
802
+ * @returns 返回 Thread 对象数组(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/forum/model.html#Thread)
803
+ * @returns is_finish 为 1 时,表示已拉取完 为 0 时,表示未拉取完
804
+ */
805
+ channelsThreads(channel_id: string): Promise<any>;
806
+ /**
807
+ * 获取帖子详情
808
+ * @param channel_id 子频道id
809
+ * @param thread_id 帖子id
810
+ * @returns 返回 帖子详情对象(详见https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/forum/model.html#ThreadInfo)
811
+ * 其中content字段可参考 https://bot.q.qq.com/wiki/develop/api-v2/server-inter/channel/content/forum/model.html#RichText
812
+ */
813
+ channelsThreadsThread(channel_id: string, thread_id: string): Promise<any>;
814
+ /**
815
+ * 发表帖子
816
+ * @param channel_id 子频道id
817
+ * @param title 帖子标题
818
+ * @param content 帖子内容
819
+ * @param format 帖子内容格式 1:纯文本 2:HTML 3:Markdown 4:JSON
820
+ * @returns 返回 {task_id:string,create_time:string} 其中 task_id 为帖子id,create_time 发帖时间戳
821
+ */
822
+ channelsThreadsPut(channel_id: string, data: {
823
+ title: string;
824
+ content: string;
825
+ format: 1 | 2 | 3 | 4;
826
+ }): Promise<any>;
827
+ /**
828
+ * 删除帖子
829
+ * @param channel_id 子频道id
830
+ * @param thread_id 帖子id
831
+ * @returns
832
+ */
833
+ channelsThreadsDelete(channel_id: string, thread_id: string): Promise<any>;
834
+ /**
835
+ * ********
836
+ * 接口权限api
837
+ * **********
838
+ */
839
+ /**
840
+ * 获得频道可用权限列表
841
+ * @param guild_id
842
+ * @returns
843
+ */
844
+ guildApiPermission(guild_id: string): Promise<any>;
845
+ }
846
+
847
+ export { QQBotAPI };