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,38 @@
1
+ export declare const now_e: {
2
+ /**
3
+ * 卡片
4
+ * @param obj
5
+ * @returns
6
+ */
7
+ replyCard: (obj: {
8
+ type: 'embed' | 'ark';
9
+ card: any;
10
+ }) => Promise<boolean>;
11
+ /**
12
+ * 引用消息
13
+ * @param mid
14
+ * @param boj
15
+ * @returns
16
+ */
17
+ replyByMid: (mid: string, msg: string) => Promise<boolean>;
18
+ /**
19
+ * 发送表情表态
20
+ * @param mid
21
+ * @param boj { emoji_type: number; emoji_id: string }
22
+ * @returns
23
+ */
24
+ replyEmoji: (mid: string, boj: {
25
+ emoji_type: number;
26
+ emoji_id: string;
27
+ }) => Promise<boolean>;
28
+ /**
29
+ * 删除表情表态
30
+ * @param mid
31
+ * @param boj { emoji_type: number; emoji_id: string }
32
+ * @returns
33
+ */
34
+ deleteEmoji: (mid: string, boj: {
35
+ emoji_type: number;
36
+ emoji_id: string;
37
+ }) => Promise<boolean>;
38
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * AUDIO_MICROPHONE 音频
3
+ * AUDIO_FREQUENCY 麦克风
4
+ */
5
+ /**
6
+ * DO
7
+ */
8
+ /**
9
+ AUDIO_ACTION (1 << 29)
10
+ - AUDIO_START // 音频开始播放时 create
11
+ - AUDIO_FINISH // 音频播放结束时 delete
12
+ - AUDIO_ON_MIC // 上麦时 create
13
+ - AUDIO_OFF_MIC // 下麦时 delete
14
+ */
15
+ export declare const AUDIO_ACTION: (event: any) => Promise<void>;
@@ -0,0 +1,16 @@
1
+ import { IOpenAPI } from 'qq-guild-bot';
2
+ import { directEventData } from '../types.js';
3
+ declare global {
4
+ var clientApiByQQ: IOpenAPI;
5
+ }
6
+ /**
7
+ * *
8
+ * 私信
9
+ * *
10
+ */
11
+ /**
12
+ DIRECT_MESSAGE (1 << 12)
13
+ - DIRECT_MESSAGE_CREATE // 当收到用户发给机器人的私信消息时
14
+ - DIRECT_MESSAGE_DELETE // 删除(撤回)消息事件
15
+ */
16
+ export declare const DIRECT_MESSAGE: (event: directEventData) => Promise<void>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * ***********
3
+ * THREAD 主题 FORUMS_THREAD
4
+ * POST 帖子 FORUMS_POST
5
+ * REPLY 评论 FORUMS_REPLY
6
+ */
7
+ /**
8
+ * DO
9
+ */
10
+ /**
11
+ FORUMS_EVENT (1 << 28) // 论坛事件,仅 *私域* 机器人能够设置此 intents。
12
+
13
+ - FORUM_THREAD_CREATE // 当用户创建主题时
14
+ - FORUM_THREAD_UPDATE // 当用户更新主题时
15
+ - FORUM_THREAD_DELETE // 当用户删除主题时
16
+
17
+ - FORUM_POST_CREATE // 当用户创建帖子时
18
+ - FORUM_POST_DELETE // 当用户删除帖子时
19
+
20
+ - FORUM_REPLY_CREATE // 当用户回复评论时
21
+ - FORUM_REPLY_DELETE // 当用户删除评论时
22
+
23
+ - FORUM_PUBLISH_AUDIT_RESULT // 当用户发表审核通过时
24
+ */
25
+ export declare const FORUMS_EVENT: (event: any) => Promise<void>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * GUILD 频道
3
+ * CHANNEL 子频道
4
+ */
5
+ /**
6
+ * DO
7
+ */
8
+ /**
9
+ GUILDS (1 << 0)
10
+
11
+ - GUILD_CREATE // 当机器人加入新guild时
12
+ - GUILD_UPDATE // 当guild资料发生变更时
13
+ - GUILD_DELETE // 当机器人退出guild时
14
+ -
15
+ - CHANNEL_CREATE // 当channel被创建时
16
+ - CHANNEL_UPDATE // 当channel被更新时
17
+ - CHANNEL_DELETE // 当channel被删除时
18
+ */
19
+ export declare const GUILDS: (event: any) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ import { IOpenAPI } from 'qq-guild-bot';
2
+ declare global {
3
+ var clientApiByQQ: IOpenAPI;
4
+ }
5
+ /**
6
+ GUILD_MEMBERS (1 << 1)
7
+ - GUILD_MEMBER_ADD // 当成员加入时
8
+ - GUILD_MEMBER_UPDATE // 当成员资料变更时
9
+ - GUILD_MEMBER_REMOVE // 当成员被移除时
10
+ */
11
+ export declare const GUILD_MEMBERS: (event: any) => Promise<boolean>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * *私域*
3
+ */
4
+ /**
5
+ GUILD_MESSAGES (1 << 9) // 消息事件,仅 *私域* 机器人能够设置此 intents。
6
+ - MESSAGE_CREATE
7
+ // 频道内的全部消息,
8
+ 而不只是 at 机器人的消息。
9
+ 内容与 AT_MESSAGE_CREATE 相同
10
+ - MESSAGE_DELETE // 删除(撤回)消息事件
11
+ * */
12
+ export declare const GUILD_MESSAGES: (event: any) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * DO
3
+ */
4
+ /**
5
+ GUILD_MESSAGE_REACTIONS (1 << 10)
6
+ - MESSAGE_REACTION_ADD // 为消息添加表情表态
7
+ - MESSAGE_REACTION_REMOVE // 为消息删除表情表态
8
+ */
9
+ export declare const GUILD_MESSAGE_REACTIONS: (event: any) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * DO
3
+ */
4
+ /**
5
+ INTERACTION (1 << 26)
6
+ - INTERACTION_CREATE // 互动事件创建时
7
+ */
8
+ export declare const INTERACTION: (event: any) => Promise<void>;
@@ -0,0 +1,16 @@
1
+ import { IOpenAPI } from 'qq-guild-bot';
2
+ import { AMessage } from '../../../alemon/index.js';
3
+ import { EventData } from '../types.js';
4
+ declare global {
5
+ /**
6
+ * 接口对象
7
+ */
8
+ var clientApiByQQ: IOpenAPI;
9
+ }
10
+ /**
11
+ * 公私域合并
12
+ * @param e
13
+ * @param data 原数据
14
+ * @returns
15
+ */
16
+ export declare const mergeMessages: (e: AMessage, event: EventData) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * DO
3
+ */
4
+ /**
5
+ MESSAGE_AUDIT (1 << 27)
6
+ - MESSAGE_AUDIT_PASS // 消息审核通过
7
+ - MESSAGE_AUDIT_REJECT // 消息审核不通过
8
+ */
9
+ export declare const MESSAGE_AUDIT: (event: any) => Promise<void>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * ***********
3
+ * 公域可能已删除公域论坛事件
4
+ * ***********
5
+ */
6
+ /**
7
+ * DO
8
+ */
9
+ /**
10
+ * ***********
11
+ * THREAD 主题 FORUMS_THREAD
12
+ * POST 帖子 FORUMS_POST
13
+ * REPLY 评论 FORUMS_REPLY
14
+ */
15
+ /**
16
+ OPEN_FORUMS_EVENT (1 << 18) // 论坛事件, 此为公域的论坛事件
17
+
18
+ - OPEN_FORUM_THREAD_CREATE // 当用户创建主题时
19
+ - OPEN_FORUM_THREAD_UPDATE // 当用户更新主题时
20
+ - OPEN_FORUM_THREAD_DELETE // 当用户删除主题时
21
+
22
+ - OPEN_FORUM_POST_CREATE // 当用户创建帖子时
23
+ - OPEN_FORUM_POST_DELETE // 当用户删除帖子时
24
+
25
+ - OPEN_FORUM_REPLY_CREATE // 当用户回复评论时
26
+ - OPEN_FORUM_REPLY_DELETE // 当用户删除评论时
27
+ */
28
+ export declare const OPEN_FORUMS_EVENT: (event: any) => Promise<void>;
@@ -0,0 +1,12 @@
1
+ import { EventData } from '../types.js';
2
+ /**
3
+ * *
4
+ * 公域
5
+ * *
6
+ */
7
+ /**
8
+ PUBLIC_GUILD_MESSAGES (1 << 30) // 消息事件,此为公域的消息事件
9
+ AT_MESSAGE_CREATE // 当收到@机器人的消息时
10
+ PUBLIC_MESSAGE_DELETE // 当频道的消息被删除时
11
+ */
12
+ export declare const PUBLIC_GUILD_MESSAGES: (event: EventData) => Promise<void>;
@@ -0,0 +1,29 @@
1
+ import { IOpenAPI } from 'qq-guild-bot';
2
+ declare global {
3
+ var clientApiByQQ: IOpenAPI;
4
+ }
5
+ /**
6
+ * 得到权限对象
7
+ * @param value 权值
8
+ * @returns
9
+ */
10
+ export declare function getPermissionsFromValue(value: number): {
11
+ look: boolean;
12
+ manage: boolean;
13
+ speak: boolean;
14
+ broadcast: boolean;
15
+ };
16
+ /**
17
+ * 得到权限对象
18
+ * @param channel_id 频道id
19
+ * @param id 用户id
20
+ * @returns
21
+ */
22
+ export declare function channewlPermissions(channel_id: any, id: any): Promise<{
23
+ botmiss: any;
24
+ look: boolean;
25
+ manage: boolean;
26
+ speak: boolean;
27
+ broadcast: boolean;
28
+ state: boolean;
29
+ }>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { IOpenAPI } from 'qq-guild-bot';
3
+ import { QQEMessage } from './types.js';
4
+ declare global {
5
+ var clientApiByQQ: IOpenAPI;
6
+ }
7
+ /**
8
+ * 公信转私信
9
+ * @param EMessage
10
+ * @param msg
11
+ * @param img
12
+ * @returns
13
+ */
14
+ export declare const Private: (EMessage: QQEMessage, msg?: string | string[] | Buffer, img?: Buffer | string, name?: string) => Promise<boolean>;
@@ -0,0 +1,19 @@
1
+ export declare const segmentQQ: {
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
+ };
@@ -0,0 +1,82 @@
1
+ interface Member {
2
+ joined_at: string;
3
+ nick: string;
4
+ roles: string[];
5
+ }
6
+ interface Author {
7
+ avatar: string;
8
+ bot: boolean;
9
+ id: string;
10
+ username: string;
11
+ }
12
+ export interface QQEMessage {
13
+ author: {
14
+ avatar: string;
15
+ bot: boolean;
16
+ id: string;
17
+ username: string;
18
+ };
19
+ channel_id: string;
20
+ content: string;
21
+ guild_id: string;
22
+ id: string;
23
+ member: Member;
24
+ mentions: Author[];
25
+ seq: number;
26
+ seq_in_channel: string;
27
+ timestamp: string;
28
+ }
29
+ export declare enum EventTypeDataEnum {
30
+ AT_MESSAGE_CREATE = "AT_MESSAGE_CREATE"
31
+ }
32
+ export interface EventData {
33
+ eventType: 'AT_MESSAGE_CREATE';
34
+ eventId: string;
35
+ msg: QQEMessage;
36
+ }
37
+ export interface directQQEMessage {
38
+ author: {
39
+ avatar: string;
40
+ bot: boolean;
41
+ id: string;
42
+ username: string;
43
+ };
44
+ channel_id: string;
45
+ content: string;
46
+ guild_id: string;
47
+ direct_message?: boolean;
48
+ id: string;
49
+ member: {
50
+ joined_at: string;
51
+ };
52
+ mentions: Author[];
53
+ seq: number;
54
+ seq_in_channel: string;
55
+ timestamp: string;
56
+ }
57
+ export interface directEventData {
58
+ eventType: 'AT_MESSAGE_CREATE';
59
+ eventId: string;
60
+ msg: directQQEMessage;
61
+ }
62
+ /**
63
+ * 可查看子频道 0x0000000001(1 << 0) 支持指定成员可见类型,支持身份组可见类型
64
+ * 可管理子频道 0x0000000002(1 << 1) 创建者、管理员、子频道管理员都具有此权限
65
+ * 可发言子频道 0x0000000004(1 << 2) 支持指定成员发言类型,支持身份组发言类型
66
+ * 可直播子频道 0x0000000008 (1 << 3) 支持指定成员发起直播,支持身份组发起直播;仅可在直播子频道中设置
67
+ */
68
+ export declare const permissions: {
69
+ look: number;
70
+ manage: number;
71
+ speak: number;
72
+ broadcast: number;
73
+ };
74
+ export declare const not_permissions: {
75
+ state: boolean;
76
+ look: boolean;
77
+ manage: boolean;
78
+ speak: boolean;
79
+ broadcast: boolean;
80
+ botmiss: number;
81
+ };
82
+ export {};
@@ -0,0 +1,6 @@
1
+ import './alemon/console.js';
2
+ import { IOpenAPI } from 'qq-guild-bot';
3
+ declare global {
4
+ var clientApiByQQ: IOpenAPI;
5
+ }
6
+ export declare function createAlemonByQQ(): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 登录配置
3
+ * @param Bcf
4
+ * @returns
5
+ */
6
+ export declare function checkRobotByQQ(): Promise<boolean>;
@@ -0,0 +1,85 @@
1
+ import { GatewayIntentBits } from 'discord.js';
2
+ import { AvailableIntentsEventsEnum } from 'qq-guild-bot';
3
+ export interface RedisConfig {
4
+ host: string;
5
+ port: number;
6
+ password: string;
7
+ db: number;
8
+ }
9
+ export interface MysqlConfig {
10
+ host: string;
11
+ port: number;
12
+ user: string;
13
+ password: string;
14
+ database: string;
15
+ }
16
+ export interface DiscordConfig {
17
+ token: string;
18
+ masterID: string;
19
+ password: string;
20
+ intents: GatewayIntentBits[];
21
+ }
22
+ export interface KookConfig {
23
+ token: string;
24
+ masterID: string;
25
+ password: string;
26
+ }
27
+ export interface VillaConfig {
28
+ bot_id: string;
29
+ secret: string;
30
+ pub_key: string;
31
+ masterID: string;
32
+ password: string;
33
+ http: string;
34
+ url: string;
35
+ port: number;
36
+ size: number;
37
+ img_url: string;
38
+ IMAGE_DIR: string;
39
+ }
40
+ export declare enum NtQQEventsEnum {
41
+ GROUP_AT_MESSAGE_CREATE = "GROUP_AT_MESSAGE_CREATE",
42
+ C2C_MESSAGE_CREATE = "C2C_MESSAGE_CREATE"
43
+ }
44
+ export interface NtQQConfig {
45
+ appID: string;
46
+ token: string;
47
+ secret: string;
48
+ masterID: string;
49
+ password: string;
50
+ intents: NtQQEventsEnum[];
51
+ port: number;
52
+ size: number;
53
+ img_url: string;
54
+ IMAGE_DIR: string;
55
+ http: string;
56
+ }
57
+ export interface QQConfig {
58
+ appID: string;
59
+ token: string;
60
+ masterID: string;
61
+ password: string;
62
+ intents: AvailableIntentsEventsEnum[];
63
+ isPrivate: boolean;
64
+ sandbox: boolean;
65
+ }
66
+ export interface ServerConfig {
67
+ host: string;
68
+ port: number;
69
+ }
70
+ export interface PuppeteerConfig {
71
+ args: string[];
72
+ headless: 'new';
73
+ timeout: number;
74
+ }
75
+ export interface ConfigType {
76
+ redis?: RedisConfig;
77
+ mysql?: MysqlConfig;
78
+ discord?: DiscordConfig;
79
+ kook?: KookConfig;
80
+ villa?: VillaConfig;
81
+ qq?: QQConfig;
82
+ server?: ServerConfig;
83
+ puppeteer?: PuppeteerConfig;
84
+ ntqq?: NtQQConfig;
85
+ }
@@ -0,0 +1,7 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * 消息接收入口
4
+ * @param req
5
+ * @param res
6
+ */
7
+ export declare function callBackByVilla(event: BotEvent): Promise<any>;
@@ -0,0 +1,10 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * 涉及房间的接口不可用
4
+ */
5
+ /**
6
+ * 机器人进出
7
+ * @param event 回调数据
8
+ * @param val 类型控制
9
+ */
10
+ export declare function GUILDS_VILLA(event: BotEvent): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * todo
4
+ * 未判断成员退出别野
5
+ */
6
+ /**
7
+ * 涉及房间的接口不可用
8
+ */
9
+ /**
10
+ * 成员进出
11
+ * @param event 回调数据
12
+ * @param val 类型控制
13
+ */
14
+ export declare function GUILD_MEMBERS_VILLA(event: BotEvent): Promise<void>;
@@ -0,0 +1,7 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * 表情表态
4
+ * @param event 回调数据
5
+ * @param val 类型控制
6
+ */
7
+ export declare function GUILD_MESSAGE_REACTIONS_VILLA(event: BotEvent): Promise<void>;
@@ -0,0 +1,7 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * 消息会话
4
+ * @param event 回调数据
5
+ * @param val 类型控制
6
+ */
7
+ export declare function MESSAGES_VILLA(event: BotEvent): Promise<boolean>;
@@ -0,0 +1,10 @@
1
+ import { BotEvent } from 'mys-villa';
2
+ /**
3
+ * 如何判断审核事件成功与否?
4
+ */
5
+ /**
6
+ * 审核事件
7
+ * @param event 回调数据
8
+ * @param val 类型控制
9
+ */
10
+ export declare function MESSAGE_AUDIT_VILLA(event: BotEvent): Promise<void>;
@@ -0,0 +1,37 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { CardType } from '../../../alemon/index.js';
3
+ export declare const now_e: {
4
+ /**
5
+ * 卡片
6
+ * @param obj
7
+ * @returns
8
+ */
9
+ replyCard: (arr: CardType[]) => Promise<boolean>;
10
+ /**
11
+ * 引用消息
12
+ * @param mid
13
+ * @param boj
14
+ * @returns
15
+ */
16
+ replyByMid: (mid: string, msg: string | string[] | Buffer) => Promise<boolean>;
17
+ /**
18
+ * 发送表情表态
19
+ * @param mid
20
+ * @param boj { emoji_type: number; emoji_id: string }
21
+ * @returns
22
+ */
23
+ replyEmoji: (mid: string, boj: {
24
+ emoji_type: number;
25
+ emoji_id: string;
26
+ }) => Promise<boolean>;
27
+ /**
28
+ * 删除表情表态
29
+ * @param mid
30
+ * @param boj { emoji_type: number; emoji_id: string }
31
+ * @returns
32
+ */
33
+ deleteEmoji: (mid: string, boj: {
34
+ emoji_type: number;
35
+ emoji_id: string;
36
+ }) => Promise<boolean>;
37
+ };
@@ -0,0 +1,26 @@
1
+ export declare const segmentVilla: {
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
+ };
@@ -0,0 +1 @@
1
+ export declare function createAlemonByVilla(): Promise<boolean>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 登录配置
3
+ * @param Bcf
4
+ * @param val
5
+ * @returns
6
+ */
7
+ export declare function checkRobotByVilla(): Promise<boolean>;