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,66 @@
1
+ export declare const segmentKOOK: {
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 role_id 角色
29
+ */
30
+ role: (role_id: string) => string;
31
+ /**
32
+ * 点击后才显示
33
+ * @param content 内容
34
+ */
35
+ spoiler: (content: string) => string;
36
+ /**
37
+ *
38
+ * @param name 服务器表情名
39
+ * @param id 服务器表情id
40
+ */
41
+ expression: (name: string, id: string) => string;
42
+ /**
43
+ * 加粗
44
+ * @param txt
45
+ */
46
+ Bold: (txt: string) => string;
47
+ /**
48
+ * 斜体
49
+ * @param txt
50
+ */
51
+ italic: (txt: string) => string;
52
+ /**
53
+ * 加粗斜体
54
+ */
55
+ boldItalic: (txt: string) => string;
56
+ /**
57
+ * 删除线
58
+ * @param txt
59
+ */
60
+ strikethrough: (txt: string) => string;
61
+ /**
62
+ * 代码块
63
+ * @param txt
64
+ */
65
+ block: (txt: string) => string;
66
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 创建实例
3
+ * @returns
4
+ */
5
+ export declare function createAlemonByKOOK(): Promise<boolean>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 登录配置
3
+ * @param Bcf
4
+ * @param val
5
+ * @returns
6
+ */
7
+ export declare function checkRobotByKOOK(): Promise<boolean>;
@@ -0,0 +1,18 @@
1
+ import { ConfigType } from './types.js';
2
+ /**
3
+ * 初始化配置
4
+ * @param val
5
+ */
6
+ export declare function setBotConfig(val: ConfigType): void;
7
+ /**
8
+ * 设置
9
+ * @param key
10
+ * @param val
11
+ */
12
+ export declare function setBotConfigByKey<T extends keyof ConfigType>(key: T, val: ConfigType[T]): void;
13
+ /**
14
+ * 得到配置
15
+ * @param key
16
+ * @returns
17
+ */
18
+ export declare function getBotConfigByKey<T extends keyof ConfigType>(key: T): ConfigType[T] | undefined;
@@ -0,0 +1,15 @@
1
+ import { ClientAPIByQQ } from './ntqq/sdk/index.js';
2
+ interface botOpoint {
3
+ args?: string[];
4
+ mount?: boolean;
5
+ address?: string;
6
+ cfg?: string;
7
+ }
8
+ /**
9
+ * 创建机器人
10
+ * @param val
11
+ * @returns
12
+ */
13
+ export declare function createBot(val?: botOpoint): Promise<any>;
14
+ export { getBotConfigByKey, setBotConfigByKey } from './login.js';
15
+ export declare const setAuthenticationByNtqq: typeof ClientAPIByQQ.setAuthentication;
@@ -0,0 +1,8 @@
1
+ interface BotMessage {
2
+ id: string;
3
+ name: string;
4
+ avatar?: string;
5
+ }
6
+ export declare function setBotMsgByNtqq(val: BotMessage): void;
7
+ export declare function getBotMsgByNtqq(): BotMessage;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 回话对象
3
+ */
4
+ export declare const conversation: {
5
+ READY: (data: any) => Promise<void>;
6
+ GROUP_AT_MESSAGE_CREATE: (event: import("./types.js").ExampleObject) => Promise<void>;
7
+ C2C_MESSAGE_CREATE: (event: import("./types.js").ExampleObject) => Promise<void>;
8
+ };
@@ -0,0 +1,2 @@
1
+ import { ExampleObject } from '../types.js';
2
+ export declare const C2C_MESSAGE_CREATE: (event: ExampleObject) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ import { ExampleObject } from '../types.js';
2
+ /**
3
+ * 公私域合并
4
+ * @param e
5
+ * @param data 原数据
6
+ * @returns
7
+ */
8
+ export declare const GROUP_AT_MESSAGE_CREATE: (event: ExampleObject) => Promise<void>;
@@ -0,0 +1,20 @@
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
+ link: (title: string, centent: any) => string;
20
+ };
@@ -0,0 +1,11 @@
1
+ interface Author {
2
+ id: string;
3
+ }
4
+ export interface ExampleObject {
5
+ author: Author;
6
+ content: string;
7
+ group_id: string;
8
+ id: string;
9
+ timestamp: string;
10
+ }
11
+ export {};
@@ -0,0 +1 @@
1
+ export declare function createAlemonByNtqq(): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 登录配置
3
+ * @param Bcf
4
+ * @returns
5
+ */
6
+ export declare function checkRobotByQQ(): Promise<boolean>;
@@ -0,0 +1,44 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ export declare function setAuthentication(val: string): void;
3
+ /**
4
+ * 得到鉴权
5
+ * @param appId
6
+ * @param clientSecret
7
+ * @param url
8
+ * @returns
9
+ */
10
+ export declare function getAuthentication(appId: string, clientSecret: string): Promise<import("axios").AxiosResponse<any, any>>;
11
+ /**
12
+ * 创建axios实例
13
+ * @param config
14
+ * @returns
15
+ */
16
+ export declare function requestService(config: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
17
+ /**
18
+ * 发送图片
19
+ * @param openid
20
+ * @param content
21
+ * @returns
22
+ */
23
+ export declare function postFilesByUsers(openid: string, content: string): Promise<any>;
24
+ /**
25
+ * 发送群聊图片
26
+ * @param openid
27
+ * @param content
28
+ * @returns
29
+ */
30
+ export declare function postFilesByGroup(openid: string, content: string): Promise<any>;
31
+ /**
32
+ * 发送私聊消息
33
+ * @param openid
34
+ * @param content
35
+ * @returns
36
+ */
37
+ export declare function postMessageByUser(openid: string, content: string, msg_id: any): Promise<import("axios").AxiosResponse<any, any>>;
38
+ /**
39
+ * 发送群聊消息
40
+ * @param openid
41
+ * @param content
42
+ * @returns
43
+ */
44
+ export declare function postMessageByGroup(group_openid: string, content: string, msg_id?: string): Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,23 @@
1
+ import { type BotConfig } from './typings.js';
2
+ /**
3
+ * 得到机器人配置
4
+ * @returns
5
+ */
6
+ export declare function getBotConfig(): BotConfig;
7
+ /**
8
+ * 设置机器人配置
9
+ * @param val
10
+ * @returns
11
+ */
12
+ export declare function setBotConfig(val: BotConfig): void;
13
+ import { type WebConfig } from './types.js';
14
+ /**
15
+ * 设置配置
16
+ * @param cfg
17
+ */
18
+ export declare function setWebConfig(cfg: WebConfig): void;
19
+ /**
20
+ * 得到配置
21
+ * @returns
22
+ */
23
+ export declare function getWebConfig(): WebConfig;
@@ -0,0 +1,5 @@
1
+ export * as ClientAPIByQQ from './api.js';
2
+ export * from './typings.js';
3
+ export * from './config.js';
4
+ export * from './wss.js';
5
+ export * as ClinetWeb from './web/index.js';
@@ -0,0 +1,2 @@
1
+ import { IntentsEnum } from './typings.js';
2
+ export declare function getIntentsMask(intents: IntentsEnum[]): number;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 客户端配置
3
+ */
4
+ export interface WebConfig {
5
+ callback_port?: number;
6
+ img_url?: string;
7
+ img_size?: number;
8
+ IMAGE_DIR?: string;
9
+ http?: string;
10
+ port?: string;
11
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 登录配置
3
+ */
4
+ export interface BotConfig {
5
+ appID: string;
6
+ token: string;
7
+ secret: string;
8
+ intents: IntentsEnum[];
9
+ }
10
+ /**
11
+ *
12
+ */
13
+ export type IntentsEnum = (typeof AvailableIntentsEventsEnum)[number];
14
+ /**
15
+ * 订阅枚举
16
+ */
17
+ export declare const AvailableIntentsEventsEnum: readonly ["FRIEND_ADD", "GROUP_AT_MESSAGE_CREATE", "C2C_MESSAGE_CREATE", "INTERACTION_CREATE"];
@@ -0,0 +1,8 @@
1
+ import { type WebConfig } from '../types.js';
2
+ /**
3
+ * 创建客户端
4
+ * @param param0
5
+ * @param callBack
6
+ * @param logFnc
7
+ */
8
+ export declare function createWeb({ callback_port, img_size, http, img_url, IMAGE_DIR }: WebConfig, logFnc?: (port: number) => Promise<void>): void;
@@ -0,0 +1,20 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { type Context } from 'koa';
3
+ /**
4
+ * 处理图片请求
5
+ * @param req
6
+ * @param res
7
+ */
8
+ export declare function getLocalImg(ctx: Context): void;
9
+ /**
10
+ * 自动清除机制
11
+ * 清除挂载下的所有图片
12
+ * 'jpg', 'jpeg', 'png', 'gif'
13
+ * @param time
14
+ */
15
+ export declare function autoClearImages(time: number): void;
16
+ /**
17
+ * 存储图片
18
+ * @param Buffer 元素
19
+ */
20
+ export declare function setLocalImg(img: Buffer): Promise<string | false>;
@@ -0,0 +1,4 @@
1
+ export * from './client.js';
2
+ export * from '../types.js';
3
+ export * from './img.js';
4
+ export * from './ip.js';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 得到ip地址
3
+ * @returns
4
+ */
5
+ export declare function getIP(): Promise<any>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ *
3
+ */
4
+ export type OpStart = {
5
+ READY?: (event: any) => Promise<any>;
6
+ FRIEND_ADD?: (event: any) => Promise<any>;
7
+ GROUP_AT_MESSAGE_CREATE?: (event: any) => Promise<any>;
8
+ C2C_MESSAGE_CREATE?: (event: any) => Promise<any>;
9
+ INTERACTION_CREATE?: (event: any) => Promise<any>;
10
+ };
11
+ /**
12
+ * @param token token
13
+ * @returns
14
+ */
15
+ export declare function getGatewayUrl(): Promise<string | undefined>;
16
+ /**
17
+ * 使用获取到的网关连接地址建立 WebSocket 连接
18
+ * @param token
19
+ * @param callBack
20
+ */
21
+ export declare function createClient(call: OpStart, shard?: number[]): Promise<void>;
22
+ /**
23
+
24
+ 1 Heartbeat Send/Receive 客户端或服务端发送心跳
25
+ 2 Identify Send 客户端发送鉴权
26
+ 6 Resume Send 客户端恢复连接
27
+
28
+ 0 Dispatch Receive 服务端进行消息推送
29
+ 7 Reconnect Receive 服务端通知客户端重新连接
30
+ 9 Invalid Session Receive 当identify或resume的时候,如果参数有错,服务端会返回该消息
31
+ 10 Hello Receive 当客户端与网关建立ws连接之后,网关下发的第一条消息
32
+ 11 Heartbeat ACK Receive/Reply 当发送心跳成功之后,就会收到该消息
33
+ 12 HTTP Callback ACK Reply 仅用于 http 回调模式的回包,代表机器人收到了平台推送的数据
34
+
35
+ */
@@ -0,0 +1,154 @@
1
+ /**
2
+ * 此文件方法仅作测试使用
3
+ * 当测试通过时将会放置AMessage
4
+ * 开发者在测试时若该接口测试完毕
5
+ * 可仓库提交详细信息以升级AMessage
6
+ */
7
+ import { IGuild, IChannel, IMember, IOpenAPI } from 'qq-guild-bot';
8
+ declare global {
9
+ var clientApiByQQ: IOpenAPI;
10
+ }
11
+ /**
12
+ * **********
13
+ * 频道api
14
+ * ************
15
+ */
16
+ /**
17
+ * 获取当前用户下的所有频道列表
18
+ * @returns
19
+ */
20
+ export declare const getGuildList: () => Promise<boolean | IGuild[]>;
21
+ /**
22
+ * 获取频道详情
23
+ * @param guildId
24
+ * **************
25
+ id string 频道 ID
26
+ name string 频道名称
27
+ owner_id string 创建人用户 ID
28
+ owner boolean 当前人是否是创建人
29
+ member_count number 成员数
30
+ max_members number 最大成员数
31
+ description string 描述
32
+ */
33
+ export declare const getGuildMsg: (guildId: string) => Promise<boolean | IGuild>;
34
+ /**
35
+ * *****************
36
+ * 子频道api
37
+ * *****************
38
+ */
39
+ /**
40
+ * 获取子频道列表
41
+ * @param guildId
42
+ * @returns
43
+ * ***********
44
+ id string 子频道 ID
45
+ guild_id string 频道 ID
46
+ name string 子频道名
47
+ type number 子频道类型 ChannelType
48
+ sub_type number 子频道子类型 ChannelSubType
49
+ position number 排序,非必填
50
+ parent_id string 分组 ID
51
+ owner_id string 创建人 ID
52
+ */
53
+ export declare const getChannels: (guildId: string) => Promise<boolean | IChannel[]>;
54
+ /**
55
+ * 获取子频道详情
56
+ * @param channelId
57
+ * @returns
58
+ id string 子频道 ID
59
+ guild_id string 频道 ID
60
+ name string 子频道名
61
+ type number 子频道类型 ChannelType
62
+ sub_type number 子频道子类型 ChannelSubType
63
+ position number 排序,非必填
64
+ parent_id string 分组 ID
65
+ owner_id string 创建人 ID
66
+ */
67
+ export declare const getChannel: (channelId: string) => Promise<boolean | IChannel>;
68
+ /**
69
+ * ***********
70
+ * 仅私域可用,毫无用处
71
+ * ***********
72
+ * 创建子频道
73
+ * 修改子频道
74
+ * 删除子频道
75
+ */
76
+ /**
77
+ * ********
78
+ * 成员api
79
+ * **********
80
+ */
81
+ /***
82
+ * 获取频道下的成员列表:仅私域可用
83
+ */
84
+ /**
85
+ *获取频道下某个成员的信息
86
+ * @param guildId 频道
87
+ * @param userId 用户
88
+ * @returns
89
+ * 次功能已在e消息中携带
90
+ */
91
+ export declare const getGuildMemberMsg: (guildId: string, userId: string) => Promise<boolean | IMember>;
92
+ /**
93
+ * 移除频道的某个成员
94
+ * 仅私域
95
+ */
96
+ /**
97
+ * 用于获取 channelID 指定的语音子频道中,所有在线成员的详情列表
98
+ * 仅私域
99
+ */
100
+ /**
101
+ * ***************
102
+ * 频道身份组api
103
+ * ***********
104
+ */
105
+ /**
106
+ * **********
107
+ * 子频道权限api
108
+ * *********
109
+ * /
110
+
111
+
112
+ /**
113
+ * *******
114
+ * 消息api
115
+ * *****
116
+ */
117
+ /**
118
+ * 撤回指定消息
119
+ * @param channelID
120
+ * @param messageID
121
+ * @param hideTip 是否隐藏
122
+ * @returns
123
+ */
124
+ export declare const deleteMsg: (channelID: string, messageID: string, hideTip?: boolean) => Promise<any>;
125
+ /**
126
+ * *******
127
+ * 私信api
128
+ * ********
129
+ */
130
+ /**
131
+ * ******
132
+ * 群精华api
133
+ * ********
134
+ */
135
+ /**
136
+ * *****
137
+ * 日程api
138
+ * *****
139
+ */
140
+ /**
141
+ * *******
142
+ *音频api
143
+ * ******
144
+ */
145
+ /**
146
+ * ******
147
+ * 禁言api
148
+ * ****
149
+ */
150
+ /**
151
+ * ***********
152
+ * 权限接口api
153
+ * ********
154
+ */
@@ -0,0 +1,8 @@
1
+ interface BotMessage {
2
+ id: string;
3
+ name: string;
4
+ avatar?: string;
5
+ }
6
+ export declare function setBotMsgByQQ(val: BotMessage): void;
7
+ export declare function getBotMsgByQQ(): BotMessage;
8
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 会话事件分类
3
+ * @param ws
4
+ */
5
+ export declare const createConversationByQQ: (ws: any) => void;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * ********************
3
+ * 会被主人限制的权限
4
+ * *******************
5
+ * 是否允许主动发消息:
6
+ * 允许发送的次数
7
+ * 是否允许私聊
8
+ */
9
+ export {};
10
+ /**
11
+ * 插件需要分为
12
+ *
13
+ * 管理类插件(只做管理相关互动)
14
+ * (管理机器人在频道中任意奔放,
15
+ * 不适合做游戏等交互服务,
16
+ * 不利于分化频道消息)
17
+ *
18
+ * 功能类插件(只做服务)
19
+ * 没有管理权限,
20
+ * 由频道主去管理
21
+ * 那个机器人可以在那个频道发言
22
+ *
23
+ * 机器人没有增加删除频道的权限
24
+ *
25
+ * 当游戏玩家需要开一个自己的频道空间时
26
+ * 当仅能向频道主申请开通一个专用频道。
27
+ * 并分配身份
28
+ * (控制只允许对应身份组的成员可聊天可查看)
29
+ */
30
+ /**
31
+ * *************
32
+ * 管理类机器人(超级管理)
33
+ * ************
34
+ * 获取身份组信息
35
+ * ************
36
+ * 全局禁言
37
+ * 指定成员禁言
38
+ * **********
39
+ * 获取子频道权限
40
+ * 修改子频道权限
41
+ * 批量修改子频道权限
42
+ * *************
43
+ * 获取频道身份组
44
+ * 创建频道身分组
45
+ * 修改频道身份组
46
+ * 删除频道身份组
47
+ * *******
48
+ * 添加频道身份组-用户
49
+ * 删除频道身分组-用户
50
+ * **********
51
+ * 查看身份组权限
52
+ * 设置身分组权限
53
+ * ***********
54
+ * 创建日程
55
+ * 修改日程
56
+ * 删除日程
57
+ * ************
58
+ * 创建子频道公告
59
+ * 删除子频道公告
60
+ * ************
61
+ * 创建频道全局公告
62
+ * 删除频道全局公告
63
+ * ***********
64
+ * 创建精华消息
65
+ * 获取精华消息
66
+ * 删除精华消息
67
+ */
68
+ /**
69
+ * ************
70
+ * 普通机器人:(分组管理员、子频道管理)
71
+ * ************
72
+ * 获取成员信息
73
+ * 获取频道 (可以做数据统计)
74
+ * ****
75
+ * 获取子频道列表
76
+ * 获取子频道信息
77
+ * 获取子频道-语音/直播-在线人数
78
+ * *************
79
+ * 获取频道日程列表
80
+ * 获取单个日程信息
81
+ * *************
82
+ * 创建消息 (自己)
83
+ * 获取指定消息 (他人)
84
+ * 发表表情表态(自己)
85
+ * 删除表情表态 (自己)
86
+ * 获取频道消息频率
87
+ * 设置消息限额引导 ??
88
+ * 拉去表情表态列表 (使用消息ID)
89
+ */
90
+ /**
91
+ * 子频道机器人(也是普通机器人)
92
+ * 机器人没有身份组的概念
93
+ */