@alemonjs/qq-bot 2.1.36 → 2.1.37

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 (53) hide show
  1. package/README.md +66 -1981
  2. package/lib/config.d.ts +2 -0
  3. package/lib/framework-actions.d.ts +75 -0
  4. package/lib/framework-actions.js +620 -0
  5. package/lib/framework-events.d.ts +10 -0
  6. package/lib/framework-events.js +182 -0
  7. package/lib/hook.d.ts +16 -12
  8. package/lib/hook.js +5 -9
  9. package/lib/index.d.ts +5 -1
  10. package/lib/index.websoket.js +6 -2
  11. package/lib/message/AUDIO_EVENT.d.ts +20 -0
  12. package/lib/message/AUDIO_EVENT.js +1 -0
  13. package/lib/message/FORUM_EVENT.d.ts +33 -0
  14. package/lib/message/FORUM_EVENT.js +1 -0
  15. package/lib/message/GUILD_AUDIT.d.ts +14 -0
  16. package/lib/message/GUILD_AUDIT.js +1 -0
  17. package/lib/message/INTERACTION_CREATE.d.ts +13 -20
  18. package/lib/message/MESSAGE_CREATE.d.ts +3 -9
  19. package/lib/message/MESSAGE_DELETE.d.ts +15 -1
  20. package/lib/message/group/C2C_MESSAGE_CREATE.d.ts +3 -13
  21. package/lib/message/group/C2C_MSG_RECEIVE.d.ts +1 -1
  22. package/lib/message/group/C2C_MSG_REJECT.d.ts +1 -1
  23. package/lib/message/group/FRIEND_ADD.d.ts +7 -1
  24. package/lib/message/group/FRIEND_DEL.d.ts +4 -1
  25. package/lib/message/group/GROUP_AT_MESSAGE_CREATE.d.ts +6 -27
  26. package/lib/message/group/GROUP_MEMBER_ADD.d.ts +4 -2
  27. package/lib/message/group/GROUP_MEMBER_REMOVE.d.ts +4 -2
  28. package/lib/message/group/GROUP_MESSAGE_CREATE.d.ts +6 -27
  29. package/lib/message/group/GROUP_MSG_RECEIVE.d.ts +1 -1
  30. package/lib/message/group/GROUP_MSG_REJECT.d.ts +1 -1
  31. package/lib/message/group/MESSAGE_AUDIT_PASS.d.ts +2 -0
  32. package/lib/message/group/MESSAGE_AUDIT_REJECT.d.ts +2 -0
  33. package/lib/message/group/SUBSCRIBE_MESSAGE_STATUS.d.ts +17 -0
  34. package/lib/message/group/SUBSCRIBE_MESSAGE_STATUS.js +1 -0
  35. package/lib/register.d.ts +1 -0
  36. package/lib/register.js +279 -115
  37. package/lib/sdk/api.d.ts +93 -14
  38. package/lib/sdk/api.js +241 -45
  39. package/lib/sdk/client.webhook.js +2 -1
  40. package/lib/sdk/client.websoket.js +2 -1
  41. package/lib/sdk/intents.d.ts +1 -0
  42. package/lib/sdk/intents.js +1 -0
  43. package/lib/sdk/message.d.ts +1 -1
  44. package/lib/sdk/message.group.d.ts +4 -2
  45. package/lib/sdk/message.guild.d.ts +19 -0
  46. package/lib/sdk/non-channel-types.d.ts +138 -0
  47. package/lib/sdk/non-channel-types.js +1 -0
  48. package/lib/sdk/registry.js +2 -2
  49. package/lib/sdk/typing.d.ts +13 -1
  50. package/lib/sends.d.ts +3 -3
  51. package/lib/sends.js +46 -10
  52. package/lib/upload.js +13 -37
  53. package/package.json +7 -4
@@ -1,40 +1,19 @@
1
+ import { QQBotMessageContent, QQBotMessageUser } from "../../sdk/non-channel-types.js";
1
2
  //#region src/message/group/GROUP_MESSAGE_CREATE.d.ts
2
3
  /**
3
4
  * 群消息事件
4
5
  */
5
- interface GROUP_MESSAGE_CREATE_TYPE {
6
- attachments?: {
7
- id?: string;
8
- url?: string;
9
- content_type?: string;
10
- filename?: string;
11
- size?: number;
12
- }[];
13
- author: {
14
- bot?: boolean;
15
- id: string;
16
- member_openid: string;
17
- union_openid: string;
18
- username: string;
19
- };
6
+ interface GROUP_MESSAGE_CREATE_TYPE extends QQBotMessageContent {
7
+ author: QQBotMessageUser;
20
8
  content: string;
21
9
  group_openid: string;
22
- group_id: string;
10
+ group_id?: string;
23
11
  id: string;
24
- mentions?: {
25
- bot?: boolean;
26
- id: string;
12
+ mentions?: (QQBotMessageUser & {
27
13
  is_you?: boolean;
28
- member_openid?: string;
29
14
  scope?: string;
30
- username: string;
31
- }[];
15
+ })[];
32
16
  timestamp: string;
33
- message_scene: {
34
- ext: string[];
35
- source: string;
36
- };
37
- message_type: number;
38
17
  }
39
18
  //#endregion
40
19
  export { GROUP_MESSAGE_CREATE_TYPE };
@@ -9,7 +9,7 @@ type GROUP_MSG_RECEIVE_TYPE = {
9
9
  id?: string;
10
10
  group_openid: string;
11
11
  op_member_openid: string;
12
- timestamp: string;
12
+ timestamp: number | string;
13
13
  };
14
14
  //#endregion
15
15
  export { GROUP_MSG_RECEIVE_TYPE };
@@ -5,7 +5,7 @@
5
5
  type GROUP_MSG_REJECT_TYPE = {
6
6
  group_openid: string;
7
7
  op_member_openid: string;
8
- timestamp: string;
8
+ timestamp: number | string;
9
9
  };
10
10
  //#endregion
11
11
  export { GROUP_MSG_REJECT_TYPE };
@@ -8,6 +8,8 @@ type MESSAGE_AUDIT_PASS_TYPE = {
8
8
  create_time?: string;
9
9
  group_openid?: string;
10
10
  message_id?: string;
11
+ channel_id?: string;
12
+ guild_id?: string;
11
13
  };
12
14
  //#endregion
13
15
  export { MESSAGE_AUDIT_PASS_TYPE };
@@ -8,6 +8,8 @@ type MESSAGE_AUDIT_REJECT_TYPE = {
8
8
  create_time?: string;
9
9
  group_openid?: string;
10
10
  message_id?: string;
11
+ channel_id?: string;
12
+ guild_id?: string;
11
13
  };
12
14
  //#endregion
13
15
  export { MESSAGE_AUDIT_REJECT_TYPE };
@@ -0,0 +1,17 @@
1
+ //#region src/message/group/SUBSCRIBE_MESSAGE_STATUS.d.ts
2
+ /** 订阅消息模板授权变更,GROUP_AND_C2C_EVENT (1 << 25)。 */
3
+ type SUBSCRIBE_MESSAGE_STATUS_TYPE = {
4
+ id?: string;
5
+ group_openid?: string;
6
+ openid?: string;
7
+ result: {
8
+ template_id: number;
9
+ custom_template_id: string;
10
+ op: 1 | 2;
11
+ subscribe_id: string;
12
+ subscribe_ts: number;
13
+ update_ts: number;
14
+ }[];
15
+ };
16
+ //#endregion
17
+ export { SUBSCRIBE_MESSAGE_STATUS_TYPE };
@@ -0,0 +1 @@
1
+ export { };
package/lib/register.d.ts CHANGED
@@ -9,6 +9,7 @@ declare const register: (client: QQBotClients, options?: {
9
9
  botId?: string;
10
10
  cbp?: ReturnType<typeof cbpPlatform>;
11
11
  bindActions?: boolean;
12
+ autoInteractionAck?: boolean;
12
13
  }) => QQBotRegistration;
13
14
  //#endregion
14
15
  export { QQBotRegistration, register };