alemonjs 1.0.0

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.
Files changed (169) hide show
  1. package/LICENSE +340 -0
  2. package/README.md +54 -0
  3. package/lib/alemon/app.js +38 -0
  4. package/lib/alemon/apps.js +121 -0
  5. package/lib/alemon/buffer.js +38 -0
  6. package/lib/alemon/dealmsg.js +423 -0
  7. package/lib/alemon/dialogue.js +61 -0
  8. package/lib/alemon/index.js +40 -0
  9. package/lib/alemon/message.js +27 -0
  10. package/lib/alemon/plugin.js +44 -0
  11. package/lib/alemon/puppeteer.js +226 -0
  12. package/lib/alemon/qrcode.js +66 -0
  13. package/lib/alemon/screenshot.js +126 -0
  14. package/lib/alemon/typings.js +96 -0
  15. package/lib/config.js +25 -0
  16. package/lib/discord/alemon/api.js +44 -0
  17. package/lib/discord/alemon/bot.js +11 -0
  18. package/lib/discord/alemon/conversation.js +7 -0
  19. package/lib/discord/alemon/message/PUBLIC_GUILD_MESSAGES.js +185 -0
  20. package/lib/discord/alemon/segment.js +62 -0
  21. package/lib/discord/index.js +50 -0
  22. package/lib/discord/login.js +99 -0
  23. package/lib/index.js +12 -0
  24. package/lib/kook/alemon/bot.js +11 -0
  25. package/lib/kook/alemon/conversation.js +56 -0
  26. package/lib/kook/alemon/message/PUBLIC_GUILD_MESSAGES.js +195 -0
  27. package/lib/kook/alemon/segment.js +90 -0
  28. package/lib/kook/index.js +39 -0
  29. package/lib/kook/login.js +53 -0
  30. package/lib/login.js +112 -0
  31. package/lib/main.js +106 -0
  32. package/lib/ntqq/alemon/bot.js +11 -0
  33. package/lib/ntqq/alemon/conversation.js +18 -0
  34. package/lib/ntqq/alemon/message/C2C_MESSAGE_CREATE.js +142 -0
  35. package/lib/ntqq/alemon/message/GROUP_AT_MESSAGE_CREATE.js +218 -0
  36. package/lib/ntqq/alemon/segment.js +29 -0
  37. package/lib/ntqq/alemon/types.js +1 -0
  38. package/lib/ntqq/index.js +77 -0
  39. package/lib/ntqq/login.js +74 -0
  40. package/lib/ntqq/sdk/api.js +158 -0
  41. package/lib/ntqq/sdk/config.js +46 -0
  42. package/lib/ntqq/sdk/index.js +5 -0
  43. package/lib/ntqq/sdk/intents.js +69 -0
  44. package/lib/ntqq/sdk/types.js +1 -0
  45. package/lib/ntqq/sdk/typings.js +9 -0
  46. package/lib/ntqq/sdk/web/client.js +89 -0
  47. package/lib/ntqq/sdk/web/img.js +76 -0
  48. package/lib/ntqq/sdk/web/index.js +4 -0
  49. package/lib/ntqq/sdk/web/ip.js +24 -0
  50. package/lib/ntqq/sdk/wss.js +178 -0
  51. package/lib/qq/alemon/apidoc.js +216 -0
  52. package/lib/qq/alemon/bot.js +11 -0
  53. package/lib/qq/alemon/console.js +13 -0
  54. package/lib/qq/alemon/conversation.js +139 -0
  55. package/lib/qq/alemon/doc.js +93 -0
  56. package/lib/qq/alemon/e.js +41 -0
  57. package/lib/qq/alemon/message/AUDIO_ACTION.js +57 -0
  58. package/lib/qq/alemon/message/DIRECT_MESSAGE.js +202 -0
  59. package/lib/qq/alemon/message/FORUMS_EVENT.js +66 -0
  60. package/lib/qq/alemon/message/GUILDS.js +65 -0
  61. package/lib/qq/alemon/message/GUILD_MEMBERS.js +153 -0
  62. package/lib/qq/alemon/message/GUILD_MESSAGES.js +50 -0
  63. package/lib/qq/alemon/message/GUILD_MESSAGE_REACTIONS.js +37 -0
  64. package/lib/qq/alemon/message/INTERACTION.js +36 -0
  65. package/lib/qq/alemon/message/MESSAGE.js +303 -0
  66. package/lib/qq/alemon/message/MESSAGE_AUDIT.js +41 -0
  67. package/lib/qq/alemon/message/OPEN_FORUMS_EVENT.js +74 -0
  68. package/lib/qq/alemon/message/PUBLIC_GUILD_MESSAGES.js +52 -0
  69. package/lib/qq/alemon/permissions.js +43 -0
  70. package/lib/qq/alemon/privatechat.js +78 -0
  71. package/lib/qq/alemon/segment.js +25 -0
  72. package/lib/qq/alemon/types.js +25 -0
  73. package/lib/qq/index.js +44 -0
  74. package/lib/qq/login.js +151 -0
  75. package/lib/types.js +5 -0
  76. package/lib/villa/alemon/conversation.js +48 -0
  77. package/lib/villa/alemon/message/GUILDS.js +124 -0
  78. package/lib/villa/alemon/message/GUILD_MEMBERS.js +128 -0
  79. package/lib/villa/alemon/message/GUILD_MESSAGE_REACTIONS.js +127 -0
  80. package/lib/villa/alemon/message/MESSAGES.js +334 -0
  81. package/lib/villa/alemon/message/MESSAGE_AUDIT.js +128 -0
  82. package/lib/villa/alemon/message/e.js +41 -0
  83. package/lib/villa/alemon/segment.js +34 -0
  84. package/lib/villa/index.js +46 -0
  85. package/lib/villa/login.js +62 -0
  86. package/package.json +63 -0
  87. package/types/alemon/app.d.ts +22 -0
  88. package/types/alemon/apps.d.ts +41 -0
  89. package/types/alemon/buffer.d.ts +13 -0
  90. package/types/alemon/dealmsg.d.ts +41 -0
  91. package/types/alemon/dialogue.d.ts +55 -0
  92. package/types/alemon/index.d.ts +40 -0
  93. package/types/alemon/message.d.ts +17 -0
  94. package/types/alemon/plugin.d.ts +69 -0
  95. package/types/alemon/puppeteer.d.ts +53 -0
  96. package/types/alemon/qrcode.d.ts +20 -0
  97. package/types/alemon/screenshot.d.ts +23 -0
  98. package/types/alemon/typings.d.ts +525 -0
  99. package/types/config.d.ts +12 -0
  100. package/types/discord/alemon/api.d.ts +11 -0
  101. package/types/discord/alemon/bot.d.ts +6 -0
  102. package/types/discord/alemon/conversation.d.ts +6 -0
  103. package/types/discord/alemon/message/PUBLIC_GUILD_MESSAGES.d.ts +7 -0
  104. package/types/discord/alemon/segment.d.ts +46 -0
  105. package/types/discord/index.d.ts +1 -0
  106. package/types/discord/login.d.ts +7 -0
  107. package/types/index.d.ts +6 -0
  108. package/types/kook/alemon/bot.d.ts +8 -0
  109. package/types/kook/alemon/conversation.d.ts +7 -0
  110. package/types/kook/alemon/message/PUBLIC_GUILD_MESSAGES.d.ts +6 -0
  111. package/types/kook/alemon/segment.d.ts +66 -0
  112. package/types/kook/index.d.ts +5 -0
  113. package/types/kook/login.d.ts +7 -0
  114. package/types/login.d.ts +18 -0
  115. package/types/main.d.ts +15 -0
  116. package/types/ntqq/alemon/bot.d.ts +8 -0
  117. package/types/ntqq/alemon/conversation.d.ts +8 -0
  118. package/types/ntqq/alemon/message/C2C_MESSAGE_CREATE.d.ts +2 -0
  119. package/types/ntqq/alemon/message/GROUP_AT_MESSAGE_CREATE.d.ts +8 -0
  120. package/types/ntqq/alemon/segment.d.ts +20 -0
  121. package/types/ntqq/alemon/types.d.ts +11 -0
  122. package/types/ntqq/index.d.ts +1 -0
  123. package/types/ntqq/login.d.ts +6 -0
  124. package/types/ntqq/sdk/api.d.ts +44 -0
  125. package/types/ntqq/sdk/config.d.ts +23 -0
  126. package/types/ntqq/sdk/index.d.ts +5 -0
  127. package/types/ntqq/sdk/intents.d.ts +2 -0
  128. package/types/ntqq/sdk/types.d.ts +11 -0
  129. package/types/ntqq/sdk/typings.d.ts +17 -0
  130. package/types/ntqq/sdk/web/client.d.ts +8 -0
  131. package/types/ntqq/sdk/web/img.d.ts +20 -0
  132. package/types/ntqq/sdk/web/index.d.ts +4 -0
  133. package/types/ntqq/sdk/web/ip.d.ts +5 -0
  134. package/types/ntqq/sdk/wss.d.ts +35 -0
  135. package/types/qq/alemon/apidoc.d.ts +154 -0
  136. package/types/qq/alemon/bot.d.ts +8 -0
  137. package/types/qq/alemon/console.d.ts +1 -0
  138. package/types/qq/alemon/conversation.d.ts +5 -0
  139. package/types/qq/alemon/doc.d.ts +93 -0
  140. package/types/qq/alemon/e.d.ts +38 -0
  141. package/types/qq/alemon/message/AUDIO_ACTION.d.ts +15 -0
  142. package/types/qq/alemon/message/DIRECT_MESSAGE.d.ts +16 -0
  143. package/types/qq/alemon/message/FORUMS_EVENT.d.ts +25 -0
  144. package/types/qq/alemon/message/GUILDS.d.ts +19 -0
  145. package/types/qq/alemon/message/GUILD_MEMBERS.d.ts +11 -0
  146. package/types/qq/alemon/message/GUILD_MESSAGES.d.ts +12 -0
  147. package/types/qq/alemon/message/GUILD_MESSAGE_REACTIONS.d.ts +9 -0
  148. package/types/qq/alemon/message/INTERACTION.d.ts +8 -0
  149. package/types/qq/alemon/message/MESSAGE.d.ts +16 -0
  150. package/types/qq/alemon/message/MESSAGE_AUDIT.d.ts +9 -0
  151. package/types/qq/alemon/message/OPEN_FORUMS_EVENT.d.ts +28 -0
  152. package/types/qq/alemon/message/PUBLIC_GUILD_MESSAGES.d.ts +12 -0
  153. package/types/qq/alemon/permissions.d.ts +29 -0
  154. package/types/qq/alemon/privatechat.d.ts +14 -0
  155. package/types/qq/alemon/segment.d.ts +19 -0
  156. package/types/qq/alemon/types.d.ts +82 -0
  157. package/types/qq/index.d.ts +6 -0
  158. package/types/qq/login.d.ts +6 -0
  159. package/types/types.d.ts +85 -0
  160. package/types/villa/alemon/conversation.d.ts +7 -0
  161. package/types/villa/alemon/message/GUILDS.d.ts +10 -0
  162. package/types/villa/alemon/message/GUILD_MEMBERS.d.ts +14 -0
  163. package/types/villa/alemon/message/GUILD_MESSAGE_REACTIONS.d.ts +7 -0
  164. package/types/villa/alemon/message/MESSAGES.d.ts +7 -0
  165. package/types/villa/alemon/message/MESSAGE_AUDIT.d.ts +10 -0
  166. package/types/villa/alemon/message/e.d.ts +37 -0
  167. package/types/villa/alemon/segment.d.ts +26 -0
  168. package/types/villa/index.d.ts +1 -0
  169. package/types/villa/login.d.ts +7 -0
@@ -0,0 +1,525 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /**
3
+ * 阿柠檬消息类型
4
+ */
5
+ export interface AMessage extends EventBase, UserBase, MsgBase, Serverbase, BotBase, ApiBase {
6
+ }
7
+ /**
8
+ * 事件相关
9
+ */
10
+ interface EventBase {
11
+ /**
12
+ * 平台 qq | kook | discord | villa | ntqq
13
+ */
14
+ platform: (typeof PlatformEnum)[number];
15
+ /**
16
+ * 事件类型
17
+ */
18
+ event: (typeof EventEnum)[number];
19
+ /**
20
+ * 消息类型
21
+ */
22
+ eventType: (typeof EventType)[number];
23
+ }
24
+ /**
25
+ * 平台枚举
26
+ */
27
+ export declare const PlatformEnum: readonly ["qq", "kook", "discord", "villa", "ntqq", "wechat", "telegram", "dodo"];
28
+ /**
29
+ * 消息枚举
30
+ */
31
+ export declare const EventEnum: readonly ["GUILD", "CHANNEL", "GUILD_MEMBERS", "MESSAGE_AUDIT", "DIRECT_MESSAGE", "FORUMS_THREAD", "FORUMS_POST", "FORUMS_REPLY", "MESSAGES", "message", "GUILD_MESSAGE_REACTIONS", "INTERACTION", "AUDIO_FREQUENCY", "AUDIO_MICROPHONE", "notice.*.poke"];
32
+ /**
33
+ * 消息判断
34
+ */
35
+ export declare const EventType: readonly ["CREATE", "UPDATE", "DELETE"];
36
+ /**
37
+ * 机器人相关
38
+ */
39
+ interface BotBase {
40
+ bot: {
41
+ id: string;
42
+ name: string;
43
+ avatar?: string;
44
+ };
45
+ }
46
+ /***
47
+ * 服务器相关
48
+ */
49
+ interface Serverbase {
50
+ /**
51
+ * 频道编号 | 服务器 | 群名
52
+ */
53
+ guild_id: string;
54
+ /**
55
+ * 频道名 | 服务器名 | 群号
56
+ */
57
+ guild_name?: string;
58
+ /**
59
+ * 子频道名 | 房间名 | 群名
60
+ */
61
+ channel_name?: string;
62
+ /**
63
+ * 子频道编号 | 房间编号 | 群号
64
+ */
65
+ channel_id?: string;
66
+ /**
67
+ * 是否是私域
68
+ */
69
+ isPrivate: boolean;
70
+ /**
71
+ * 是否是群聊
72
+ */
73
+ isGroup: boolean;
74
+ }
75
+ /**
76
+ * 消息相关
77
+ */
78
+ interface MsgBase {
79
+ /**
80
+ * 是否有@
81
+ */
82
+ at: boolean;
83
+ /**
84
+ * 当有艾特时
85
+ * 第一个非机器人用户信息
86
+ * 不管是公域或私域
87
+ */
88
+ at_user?: UserType | undefined;
89
+ /**
90
+ * 艾特得到的uid即可
91
+ */
92
+ at_users?: UserType[];
93
+ /**
94
+ * 消息编号
95
+ */
96
+ msg_id: string;
97
+ /**
98
+ * 消息创建时间
99
+ */
100
+ msg_create_time: number;
101
+ /**
102
+ * 原始消息内容
103
+ */
104
+ msg_txt?: string;
105
+ /**
106
+ * 纯消息
107
+ */
108
+ msg: string;
109
+ /**
110
+ * 快捷接口
111
+ */
112
+ segment: markdownType;
113
+ /**
114
+ * 是否是撤回
115
+ */
116
+ isRecall: boolean;
117
+ }
118
+ /**
119
+ * 用户相关
120
+ */
121
+ interface UserBase {
122
+ /**
123
+ * 用户编号
124
+ */
125
+ user_id: string;
126
+ /**
127
+ * 用户名
128
+ */
129
+ user_name: string;
130
+ /**
131
+ * 用户头像
132
+ */
133
+ user_avatar: string;
134
+ /**
135
+ * 是否是主人
136
+ */
137
+ isMaster: boolean;
138
+ /**
139
+ * 权限
140
+ */
141
+ permissions?: permissionsType;
142
+ }
143
+ /**
144
+ * 用户类型
145
+ */
146
+ export interface UserType {
147
+ /**
148
+ * 用户编号
149
+ */
150
+ id: string;
151
+ /**
152
+ * 用户名称
153
+ */
154
+ name: string;
155
+ /**
156
+ * 用户头像地址
157
+ */
158
+ avatar: string;
159
+ /**
160
+ * 是否是机器人
161
+ */
162
+ bot: boolean;
163
+ }
164
+ /**
165
+ * 权限类型
166
+ */
167
+ export interface permissionsType {
168
+ /**
169
+ * 可否艾特成员
170
+ */
171
+ at?: boolean;
172
+ /**
173
+ * 可否艾特全体成员
174
+ */
175
+ atAll?: boolean;
176
+ /**
177
+ * 可否艾特频道
178
+ */
179
+ atChannel?: boolean;
180
+ /**
181
+ * 表态
182
+ */
183
+ statement?: {
184
+ create?: boolean;
185
+ update?: boolean;
186
+ delete?: boolean;
187
+ };
188
+ /**
189
+ * 发言
190
+ */
191
+ speak?: {
192
+ create?: boolean;
193
+ update?: boolean;
194
+ delete?: boolean;
195
+ };
196
+ /**
197
+ * 禁言
198
+ */
199
+ prohibition?: {
200
+ member?: boolean;
201
+ all?: boolean;
202
+ };
203
+ /**
204
+ * 身份组
205
+ */
206
+ identityGroup?: {
207
+ create?: boolean;
208
+ update?: boolean;
209
+ delete?: boolean;
210
+ };
211
+ /**
212
+ * 子频道
213
+ */
214
+ channel?: {
215
+ create?: boolean;
216
+ update?: boolean;
217
+ delete?: boolean;
218
+ };
219
+ /**
220
+ * 公告/全局公告
221
+ */
222
+ Notice?: {
223
+ create?: boolean;
224
+ update?: boolean;
225
+ delete?: boolean;
226
+ };
227
+ /**
228
+ * 精华 / 顶置 / 精选
229
+ */
230
+ essence?: {
231
+ create?: boolean;
232
+ update?: boolean;
233
+ delete?: boolean;
234
+ };
235
+ }
236
+ /**
237
+ * segment
238
+ */
239
+ export interface markdownType {
240
+ /**
241
+ * 艾特用户
242
+ * @param uid
243
+ */
244
+ at(uid: string): string;
245
+ /**
246
+ * 艾特全体
247
+ */
248
+ atAll(): string;
249
+ /**
250
+ * 艾特频道
251
+ * @param channel_id
252
+ */
253
+ atChannel?(channel_id: string): string;
254
+ /**
255
+ *
256
+ * @param role_id 角色
257
+ */
258
+ role?(role_id: string): string;
259
+ /**
260
+ * 点击后才显示
261
+ * @param content 内容
262
+ */
263
+ spoiler?(content: string): string;
264
+ /**
265
+ *
266
+ * @param name 服务器表情名
267
+ * @param id 服务器表情id
268
+ */
269
+ expression?(name: string, id: string): string;
270
+ /**
271
+ * @param txt 链接文字
272
+ * @param rul 链接地址
273
+ */
274
+ link?(txt: string, rul: string): string;
275
+ /**
276
+ * 加粗
277
+ * @param txt
278
+ */
279
+ Bold?(txt: string): string;
280
+ /**
281
+ * 斜体
282
+ * @param txt
283
+ */
284
+ italic?(txt: string): string;
285
+ /**
286
+ * 加粗斜体
287
+ */
288
+ boldItalic?(txt: string): string;
289
+ /**
290
+ * 删除线
291
+ * @param txt
292
+ */
293
+ strikethrough?(txt: string): string;
294
+ /**
295
+ * 代码块
296
+ * @param txt
297
+ */
298
+ block?(txt: string): string;
299
+ }
300
+ interface ApiBase extends replyController, WithdrawController, GuildController, GuildController, ChannelController, IdentityGroupController, UserController, MuteController {
301
+ }
302
+ interface replyController {
303
+ /**
304
+ * 消息发送机制
305
+ * @param content 消息 | buffer
306
+ * @param img 消息 | buffer
307
+ * @returns
308
+ */
309
+ reply(content?: string | string[] | Buffer, img?: Buffer | string, name?: string): Promise<boolean>;
310
+ /**
311
+ * 发送卡片
312
+ * @param arr
313
+ */
314
+ replyCard?(arr: CardType[]): Promise<boolean>;
315
+ /**
316
+ * 回复消息
317
+ * @param obj
318
+ */
319
+ replyByMid?(mid: string, content?: string | string[] | Buffer, img?: Buffer | string, name?: string): Promise<boolean>;
320
+ /**
321
+ * 回复卡片
322
+ * @param mid
323
+ * @param arr
324
+ */
325
+ replyByMidCard?(mid: string, arr: CardType[]): Promise<boolean>;
326
+ /**
327
+ * 撤回指定消息
328
+ * @param cid 频道编号
329
+ * @param mid 消息编号
330
+ * @param hideTip 是否隐藏
331
+ * @returns
332
+ */
333
+ replyDelete?(cid: string, mid: string, hideTip: boolean): Promise<any>;
334
+ /**
335
+ * 公信转私信
336
+ * QQ频道使用
337
+ * @param content 内容 | buffer
338
+ * @param obj 消息对象 | buffer
339
+ * @returns
340
+ */
341
+ replyPrivate?(content?: string | string[] | Buffer, obj?: Buffer): Promise<boolean>;
342
+ /**
343
+ * 发送表态
344
+ * @param boj
345
+ */
346
+ replyEmoji?(mid: string, boj: any): Promise<boolean>;
347
+ /**
348
+ * 删除表态
349
+ * @param boj 表情对象
350
+ * @returns
351
+ */
352
+ deleteEmoji?(mid: string, boj: any): Promise<boolean>;
353
+ /**
354
+ * 更新表态
355
+ * @param mid
356
+ * @param boj
357
+ */
358
+ updateEmoji?(mid: string, boj: any): Promise<boolean>;
359
+ /**
360
+ * 得到指定消息的表态
361
+ * @param mid
362
+ * @param boj
363
+ */
364
+ getEmoji?(mid: string): Promise<any[]>;
365
+ }
366
+ /**
367
+ * 撤回控制器
368
+ */
369
+ export interface WithdrawController {
370
+ /**
371
+ * 撤回消息
372
+ */
373
+ withdraw?: (...args: any[]) => any;
374
+ /**
375
+ * 撤回表态
376
+ */
377
+ withdrawReaction?: (...args: any[]) => any;
378
+ }
379
+ /**
380
+ * 频道控制器
381
+ */
382
+ export interface GuildController {
383
+ /**
384
+ * 得到频道列表
385
+ */
386
+ getGuild?: (...args: any[]) => any;
387
+ /**
388
+ * 得到指定频道信息
389
+ */
390
+ getGuildMsg?: (...args: any[]) => any;
391
+ /**
392
+ * 得到指定频道用户
393
+ */
394
+ getGuildUsers?: (...args: any[]) => any;
395
+ /**
396
+ * 删除指定频道用户
397
+ */
398
+ deleteGuildUser?: (...args: any[]) => any;
399
+ /**
400
+ * 创建频道公告
401
+ */
402
+ createGuildAnnounce?: (...args: any[]) => any;
403
+ /**
404
+ * 删除频道公告
405
+ */
406
+ deleteGuildAnnounce?: (...args: any[]) => any;
407
+ }
408
+ /**
409
+ * 子频道控制器
410
+ */
411
+ export interface ChannelController {
412
+ /**
413
+ * 得到子频道列表
414
+ */
415
+ getChannel?: (...args: any[]) => any;
416
+ /**
417
+ * 得到子频道信息
418
+ */
419
+ getChannelMsg?: (...args: any[]) => any;
420
+ /**
421
+ * 创建子频道
422
+ */
423
+ createChannel?: (...args: any[]) => any;
424
+ /**
425
+ * 更新子频道
426
+ */
427
+ updateChannel?: (...args: any[]) => any;
428
+ /**
429
+ * 删除子频道
430
+ */
431
+ deleteChannel?: (...args: any[]) => any;
432
+ /**
433
+ * 得到子频道权限
434
+ */
435
+ getChannelPermissions?: (...args: any[]) => any;
436
+ /**
437
+ * 更新子频道权限
438
+ */
439
+ updateChannelPermissions?: (...args: any[]) => any;
440
+ /**
441
+ * 创建子频道精华
442
+ */
443
+ createChannelAnnounce?: (...args: any[]) => any;
444
+ /**
445
+ * 创建子频道精华
446
+ */
447
+ deleteChannelAnnounce?: (...args: any[]) => any;
448
+ /**
449
+ * 创建
450
+ */
451
+ createChannelEssence?: (...args: any[]) => any;
452
+ /**
453
+ * 得到
454
+ */
455
+ getChannelEssence?: (...args: any[]) => any;
456
+ /**
457
+ * 删除
458
+ */
459
+ deleteChannelEssence?: (...args: any[]) => any;
460
+ }
461
+ /**
462
+ * 身分组控制器
463
+ */
464
+ export interface IdentityGroupController {
465
+ /**
466
+ * 得到身分组
467
+ */
468
+ getIdentityGroup?: (...args: any[]) => any;
469
+ /**
470
+ * 得到身分组信息
471
+ */
472
+ getIdentityGroupMsg?: (...args: any[]) => any;
473
+ /**
474
+ * 创建身分组
475
+ */
476
+ createIdentityGroup?: (...args: any[]) => any;
477
+ /**
478
+ * 更新身分组
479
+ */
480
+ updateIdentityGroup?: (...args: any[]) => any;
481
+ /**
482
+ * 删除身分组
483
+ */
484
+ deleteIdentityGroup?: (...args: any[]) => any;
485
+ /**
486
+ * 得到身分组权限
487
+ */
488
+ getIdentityGroupPermissions?: (...args: any[]) => any;
489
+ /**
490
+ * 更新身份组权限
491
+ */
492
+ updateIdentityGroupPermissions?: (...args: any[]) => any;
493
+ }
494
+ /**
495
+ * 用户控制器
496
+ */
497
+ export interface UserController {
498
+ /**
499
+ * 得到用户信息
500
+ */
501
+ getUserMsg?: (...args: any[]) => any;
502
+ }
503
+ /**
504
+ * 禁言控制器
505
+ */
506
+ export interface MuteController {
507
+ /**
508
+ * 全体禁言
509
+ */
510
+ muteAll?: (...args: any[]) => any;
511
+ /**
512
+ * 成员禁言
513
+ */
514
+ muteMember?: (...args: any[]) => any;
515
+ /**
516
+ * 部分成员禁言
517
+ */
518
+ muteMembers?: (...args: any[]) => any;
519
+ }
520
+ export declare const CacrdEnum: readonly ["qq_embed", "qq_ark", "kook_card"];
521
+ export interface CardType {
522
+ type: (typeof CacrdEnum)[number];
523
+ card: any;
524
+ }
525
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ConfigType } from './types.js';
2
+ /**
3
+ * 读取配置文件
4
+ * @param url
5
+ * @returns
6
+ */
7
+ export declare function getToml(url?: string): ConfigType;
8
+ /**
9
+ * 写入配置文件
10
+ * @param data
11
+ */
12
+ export declare function writeToml(data: any): void;
@@ -0,0 +1,11 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /// <reference types="node" resolution-mode="require"/>
3
+ import { Readable } from 'stream';
4
+ import { AttachmentBuilder } from 'discord.js';
5
+ /**
6
+ * 发送资源
7
+ * @param file
8
+ * @param name
9
+ * @returns
10
+ */
11
+ export declare function postImage(file: string | Buffer | Readable, name?: string): Promise<false | AttachmentBuilder>;
@@ -0,0 +1,6 @@
1
+ export declare function setBotMsgByDiscord(val: any): void;
2
+ export declare function getBotMsgByDiscord(): {
3
+ id: string;
4
+ name: string;
5
+ avatar: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 消息接收入口
3
+ * @param req
4
+ * @param res
5
+ */
6
+ export declare const callBackByDisdord: (event: import("discord.js").Message<boolean>) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import { Message as DcMessage } from 'discord.js';
2
+ /**
3
+ * 公共
4
+ * @param event
5
+ * @returns
6
+ */
7
+ export declare const PUBLIC_GUILD_MESSAGES_DISCORD: (event: DcMessage) => Promise<void>;
@@ -0,0 +1,46 @@
1
+ export declare const segmentDiscord: {
2
+ /**
3
+ * 艾特某人
4
+ * @param uid
5
+ * @returns
6
+ */
7
+ at: (uid: string) => string;
8
+ /**
9
+ * 艾特全体
10
+ * @returns
11
+ */
12
+ atAll: () => string;
13
+ /**
14
+ * 子频道引用
15
+ * @param channel_id
16
+ * @returns
17
+ */
18
+ atChannel: (channel_id: string) => string;
19
+ /**
20
+ * 蓝链接
21
+ * @param name
22
+ * @param url
23
+ * @returns
24
+ */
25
+ link: (name: string, url: string) => string;
26
+ /**
27
+ * 代码块
28
+ * @param txt
29
+ */
30
+ block: (txt: string) => string;
31
+ /**
32
+ * 加粗
33
+ * @param txt
34
+ */
35
+ Bold: (txt: string) => string;
36
+ /**
37
+ * 斜体
38
+ * @param txt
39
+ */
40
+ italic: (txt: string) => string;
41
+ /**
42
+ * 删除线
43
+ * @param txt
44
+ */
45
+ strikethrough: (txt: string) => string;
46
+ };
@@ -0,0 +1 @@
1
+ export declare function createAlemonByDiscord(): Promise<boolean>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 登录配置
3
+ * @param Bcf
4
+ * @param val
5
+ * @returns
6
+ */
7
+ export declare function checkRobotByDiscord(): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ export * from './main.js';
2
+ export * from './alemon/index.js';
3
+ /**
4
+ * 编译
5
+ */
6
+ export { compilationTools } from 'alemon-rollup';
@@ -0,0 +1,8 @@
1
+ interface BotMessage {
2
+ id: string;
3
+ name: string;
4
+ avatar?: string;
5
+ }
6
+ export declare function setBotMsgByKOOK(val: BotMessage): void;
7
+ export declare function getBotMsgByKOOK(): BotMessage;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { EventData, SystemData } from 'kook-ws';
2
+ /**
3
+ * 消息接收入口
4
+ * @param req
5
+ * @param res
6
+ */
7
+ export declare function callBackByKOOK(event: EventData | SystemData): Promise<any>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ *
3
+ * @param event
4
+ * @returns
5
+ */
6
+ export declare const PUBLIC_GUILD_MESSAGES_KOOK: (event: EventData) => Promise<boolean>;