@alemonjs/qq-bot 2.1.0-alpha.2 → 2.1.0-alpha.21

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 (109) hide show
  1. package/README.md +7 -30
  2. package/lib/config.d.ts +8 -0
  3. package/lib/config.js +20 -0
  4. package/lib/desktop.d.ts +1 -3
  5. package/lib/desktop.js +3 -12
  6. package/lib/hook.d.ts +30 -9
  7. package/lib/hook.js +19 -17
  8. package/lib/index.d.ts +5 -6
  9. package/lib/index.js +37 -19
  10. package/lib/index.webhook.d.ts +1 -0
  11. package/lib/index.webhook.js +5 -4
  12. package/lib/index.websoket.d.ts +1 -0
  13. package/lib/index.websoket.js +41 -22
  14. package/lib/message/AT_MESSAGE_CREATE.d.ts +35 -0
  15. package/lib/message/AT_MESSAGE_CREATE.js +1 -0
  16. package/lib/message/CHANNEL_CREATE.d.ts +15 -0
  17. package/lib/message/CHANNEL_CREATE.js +1 -0
  18. package/lib/message/CHANNEL_DELETE.d.ts +15 -0
  19. package/lib/message/CHANNEL_DELETE.js +1 -0
  20. package/lib/message/CHANNEL_UPDATE.d.ts +15 -0
  21. package/lib/message/CHANNEL_UPDATE.js +1 -0
  22. package/lib/message/DIRECT_MESSAGE_CREATE.d.ts +29 -0
  23. package/lib/message/DIRECT_MESSAGE_CREATE.js +1 -0
  24. package/lib/message/DIRECT_MESSAGE_DELETE.d.ts +17 -0
  25. package/lib/message/DIRECT_MESSAGE_DELETE.js +1 -0
  26. package/lib/message/ERROR.d.ts +1 -0
  27. package/lib/message/ERROR.js +1 -0
  28. package/lib/message/GUILD_CREATE.d.ts +15 -0
  29. package/lib/message/GUILD_CREATE.js +1 -0
  30. package/lib/message/GUILD_DELETE.d.ts +15 -0
  31. package/lib/message/GUILD_DELETE.js +1 -0
  32. package/lib/message/GUILD_MEMBER_ADD.d.ts +14 -0
  33. package/lib/message/GUILD_MEMBER_ADD.js +1 -0
  34. package/lib/message/GUILD_MEMBER_REMOVE.d.ts +14 -0
  35. package/lib/message/GUILD_MEMBER_REMOVE.js +1 -0
  36. package/lib/message/GUILD_MEMBER_UPDATE.d.ts +14 -0
  37. package/lib/message/GUILD_MEMBER_UPDATE.js +1 -0
  38. package/lib/message/GUILD_UPDATE.d.ts +15 -0
  39. package/lib/message/GUILD_UPDATE.js +1 -0
  40. package/lib/message/INTERACTION_CREATE.d.ts +53 -0
  41. package/lib/message/INTERACTION_CREATE.js +1 -0
  42. package/lib/message/MESSAGE_CREATE.d.ts +1 -0
  43. package/lib/message/MESSAGE_CREATE.js +1 -0
  44. package/lib/message/MESSAGE_DELETE.d.ts +1 -0
  45. package/lib/message/MESSAGE_DELETE.js +1 -0
  46. package/lib/message/MESSAGE_REACTION_ADD.d.ts +13 -0
  47. package/lib/message/MESSAGE_REACTION_ADD.js +1 -0
  48. package/lib/message/MESSAGE_REACTION_REMOVE.d.ts +13 -0
  49. package/lib/message/MESSAGE_REACTION_REMOVE.js +1 -0
  50. package/lib/message/PUBLIC_MESSAGE_DELETE.d.ts +15 -0
  51. package/lib/message/PUBLIC_MESSAGE_DELETE.js +1 -0
  52. package/lib/message/READY.d.ts +6 -0
  53. package/lib/message/READY.js +1 -0
  54. package/lib/message/group/C2C_MESSAGE_CREATE.d.ts +9 -0
  55. package/lib/message/group/C2C_MESSAGE_CREATE.js +1 -0
  56. package/lib/message/group/C2C_MSG_RECEIVE.d.ts +4 -0
  57. package/lib/message/group/C2C_MSG_RECEIVE.js +1 -0
  58. package/lib/message/group/C2C_MSG_REJECT.d.ts +4 -0
  59. package/lib/message/group/C2C_MSG_REJECT.js +1 -0
  60. package/lib/message/group/FRIEND_ADD.d.ts +4 -0
  61. package/lib/message/group/FRIEND_ADD.js +1 -0
  62. package/lib/message/group/FRIEND_DEL.d.ts +4 -0
  63. package/lib/message/group/FRIEND_DEL.js +1 -0
  64. package/lib/message/group/GROUP_ADD_ROBOT.d.ts +5 -0
  65. package/lib/message/group/GROUP_ADD_ROBOT.js +1 -0
  66. package/lib/message/group/GROUP_AT_MESSAGE_CREATE.d.ts +11 -0
  67. package/lib/message/group/GROUP_AT_MESSAGE_CREATE.js +1 -0
  68. package/lib/message/group/GROUP_DEL_ROBOT.d.ts +5 -0
  69. package/lib/message/group/GROUP_DEL_ROBOT.js +1 -0
  70. package/lib/message/group/GROUP_MSG_RECEIVE.d.ts +5 -0
  71. package/lib/message/group/GROUP_MSG_RECEIVE.js +1 -0
  72. package/lib/message/group/GROUP_MSG_REJECT.d.ts +5 -0
  73. package/lib/message/group/GROUP_MSG_REJECT.js +1 -0
  74. package/lib/register.d.ts +2 -3
  75. package/lib/register.js +270 -176
  76. package/lib/sdk/api.d.ts +196 -969
  77. package/lib/sdk/api.js +267 -916
  78. package/lib/sdk/client.webhook.d.ts +9 -0
  79. package/lib/sdk/{client.js → client.webhook.js} +19 -53
  80. package/lib/sdk/client.websoket.d.ts +9 -0
  81. package/lib/sdk/client.websoket.js +43 -96
  82. package/lib/sdk/config.d.ts +1 -0
  83. package/lib/sdk/instance.d.ts +3 -0
  84. package/lib/sdk/instance.js +93 -0
  85. package/lib/sdk/intents.d.ts +3 -0
  86. package/lib/sdk/intents.js +25 -90
  87. package/lib/sdk/message.d.ts +4 -0
  88. package/lib/sdk/message.group.d.ts +24 -0
  89. package/lib/sdk/message.group.js +1 -0
  90. package/lib/sdk/message.guild.d.ts +38 -0
  91. package/lib/sdk/message.guild.js +1 -0
  92. package/lib/sdk/message.js +1 -0
  93. package/lib/sdk/message.public.d.ts +6 -0
  94. package/lib/sdk/message.public.js +1 -0
  95. package/lib/sdk/typing.d.ts +67 -59
  96. package/lib/sdk/typing.js +1 -0
  97. package/lib/sdk/webhook.secret.d.ts +14 -0
  98. package/lib/sdk/webhook.secret.js +6 -21
  99. package/lib/sends.d.ts +29 -0
  100. package/lib/sends.js +546 -477
  101. package/lib/utils.d.ts +1 -0
  102. package/lib/utils.js +7 -12
  103. package/package.json +9 -5
  104. package/lib/index.group.js +0 -19
  105. package/lib/index.guild.js +0 -36
  106. package/lib/sdk/client.websoket.group.js +0 -221
  107. package/lib/sdk/client.websoket.guild.js +0 -205
  108. package/lib/sdk/counter.js +0 -19
  109. package/lib/sdk/from.js +0 -44
@@ -0,0 +1,14 @@
1
+ export type GUILD_MEMBER_UPDATE_TYPE = {
2
+ guild_id: string;
3
+ joined_at: string;
4
+ nick: string;
5
+ op_user_id: string;
6
+ roles: string[];
7
+ source_type?: string;
8
+ user: {
9
+ avatar: string;
10
+ bot: number;
11
+ id: string;
12
+ username: string;
13
+ };
14
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,15 @@
1
+ export type GUILD_UPDATE_TYPE = {
2
+ description: string;
3
+ icon: string;
4
+ id: string;
5
+ joined_at: string;
6
+ max_members: number;
7
+ member_count: number;
8
+ name: string;
9
+ op_user_id: string;
10
+ owner: boolean;
11
+ owner_id: string;
12
+ union_appid: string;
13
+ union_org_id: string;
14
+ union_world_id: string;
15
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,53 @@
1
+ export type INTERACTION_CREATE_TYPE = {
2
+ application_id: string;
3
+ chat_type: 1;
4
+ data: {
5
+ resolved: {
6
+ button_data: string;
7
+ button_id: number;
8
+ };
9
+ type: number;
10
+ };
11
+ group_member_openid: string;
12
+ group_openid: string;
13
+ id: string;
14
+ scene: 'group';
15
+ timestamp: string;
16
+ type: number;
17
+ version: number;
18
+ } | {
19
+ application_id: string;
20
+ chat_type: 2;
21
+ data: {
22
+ resolved: {
23
+ button_data: string;
24
+ button_id: number;
25
+ };
26
+ type: number;
27
+ };
28
+ id: string;
29
+ scene: 'c2c';
30
+ timestamp: string;
31
+ type: number;
32
+ user_openid: string;
33
+ version: number;
34
+ } | {
35
+ application_id: string;
36
+ chat_type: 0;
37
+ data: {
38
+ resolved: {
39
+ message_id: string;
40
+ button_data: string;
41
+ button_id: number;
42
+ user_id: string;
43
+ };
44
+ type: number;
45
+ };
46
+ id: string;
47
+ scene: 'guild';
48
+ timestamp: string;
49
+ type: number;
50
+ guild_id: string;
51
+ channel_id: string;
52
+ version: number;
53
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ export type MESSAGE_CREATE_TYPE = any;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ export type MESSAGE_DELETE_TYPE = any;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,13 @@
1
+ export type MESSAGE_REACTION_ADD_TYPE = {
2
+ channel_id: string;
3
+ emoji: {
4
+ id: string;
5
+ type: number;
6
+ };
7
+ guild_id: string;
8
+ target: {
9
+ id: string;
10
+ type: string;
11
+ };
12
+ user_id: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export type MESSAGE_REACTION_REMOVE_TYPE = {
2
+ channel_id: string;
3
+ emoji: {
4
+ id: string;
5
+ type: number;
6
+ };
7
+ guild_id: string;
8
+ target: {
9
+ id: string;
10
+ type: string;
11
+ };
12
+ user_id: string;
13
+ };
@@ -0,0 +1,15 @@
1
+ export type PUBLIC_MESSAGE_DELETE_TYPE = {
2
+ message: {
3
+ author: {
4
+ bot: false;
5
+ id: string;
6
+ username: string;
7
+ };
8
+ channel_id: string;
9
+ guild_id: string;
10
+ id: string;
11
+ };
12
+ op_user: {
13
+ id: string;
14
+ };
15
+ };
@@ -0,0 +1,6 @@
1
+ export type READY_TYPE = {
2
+ user: {
3
+ id: string;
4
+ name: string;
5
+ };
6
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,9 @@
1
+ export type C2C_MESSAGE_CREATE_TYPE = {
2
+ author: {
3
+ id: string;
4
+ user_openid: string;
5
+ };
6
+ content: string;
7
+ id: string;
8
+ timestamp: string;
9
+ };
@@ -0,0 +1,4 @@
1
+ export type C2C_MSG_RECEIVE_TYPE = {
2
+ openid: string;
3
+ timestamp: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type C2C_MSG_REJECT_TYPE = {
2
+ openid: string;
3
+ timestamp: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type FRIEND_ADD_TYPE = {
2
+ openid: string;
3
+ timestamp: string;
4
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ export type FRIEND_DEL_TYPE = {
2
+ openid: string;
3
+ timestamp: string;
4
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ export type GROUP_ADD_ROBOT_TYPE = {
2
+ group_openid: string;
3
+ op_member_openid: string;
4
+ timestamp: number;
5
+ };
@@ -0,0 +1,11 @@
1
+ export interface GROUP_AT_MESSAGE_CREATE_TYPE {
2
+ author: {
3
+ id: string;
4
+ member_openid: string;
5
+ };
6
+ content: string;
7
+ group_openid: string;
8
+ group_id: string;
9
+ id: string;
10
+ timestamp: string;
11
+ }
@@ -0,0 +1,5 @@
1
+ export type GROUP_DEL_ROBOT_TYPE = {
2
+ group_openid: string;
3
+ op_member_openid: string;
4
+ timestamp: number;
5
+ };
@@ -0,0 +1,5 @@
1
+ export type GROUP_MSG_RECEIVE_TYPE = {
2
+ group_openid: string;
3
+ op_member_openid: string;
4
+ timestamp: string;
5
+ };
@@ -0,0 +1,5 @@
1
+ export type GROUP_MSG_REJECT_TYPE = {
2
+ group_openid: string;
3
+ op_member_openid: string;
4
+ timestamp: string;
5
+ };
package/lib/register.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- declare const platform = "qq-bot";
2
-
3
- export { platform };
1
+ import { QQBotClients } from './sdk/client.websoket';
2
+ export declare const register: (client: QQBotClients) => void;