@alemonjs/qq-bot 0.0.20 → 0.0.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.
- package/lib/index.guild.js +18 -16
- package/lib/index.js +19 -17
- package/lib/register.js +1 -1
- package/lib/sdk/intents.js +3 -3
- package/lib/send/index.js +417 -366
- package/lib/sends.js +576 -0
- package/package.json +1 -1
package/lib/index.guild.js
CHANGED
|
@@ -11,22 +11,24 @@ var QQBotGuild = definePlatform(() => {
|
|
|
11
11
|
// intents 需要默认值
|
|
12
12
|
const client = new QQBotGuildClient({
|
|
13
13
|
app_id: config?.app_id,
|
|
14
|
-
intents: config?.intents ?? config?.is_private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
intents: config?.intents ?? config?.is_private
|
|
15
|
+
? [
|
|
16
|
+
'GUILDS', // base
|
|
17
|
+
'GUILD_MEMBERS', // base
|
|
18
|
+
'GUILD_MESSAGES',
|
|
19
|
+
'GUILD_MESSAGE_REACTIONS',
|
|
20
|
+
'DIRECT_MESSAGE',
|
|
21
|
+
'INTERACTION',
|
|
22
|
+
'FORUMS_EVENT'
|
|
23
|
+
]
|
|
24
|
+
: [
|
|
25
|
+
'GUILDS', // base
|
|
26
|
+
'GUILD_MEMBERS', // base
|
|
27
|
+
'GUILD_MESSAGE_REACTIONS',
|
|
28
|
+
'DIRECT_MESSAGE',
|
|
29
|
+
'INTERACTION',
|
|
30
|
+
'PUBLIC_GUILD_MESSAGES'
|
|
31
|
+
],
|
|
30
32
|
is_private: config?.is_private ?? false,
|
|
31
33
|
sandbox: config?.sandbox ?? false,
|
|
32
34
|
secret: config?.secret,
|
package/lib/index.js
CHANGED
|
@@ -47,23 +47,25 @@ var index = definePlatform(() => {
|
|
|
47
47
|
}
|
|
48
48
|
const client = new QQBotClients({
|
|
49
49
|
app_id: config?.app_id,
|
|
50
|
-
intents: config?.intents ?? config?.is_private
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
intents: config?.intents ?? config?.is_private
|
|
51
|
+
? [
|
|
52
|
+
'GUILDS', // base
|
|
53
|
+
'GUILD_MEMBERS', // base
|
|
54
|
+
'GUILD_MESSAGES',
|
|
55
|
+
'GUILD_MESSAGE_REACTIONS',
|
|
56
|
+
'DIRECT_MESSAGE',
|
|
57
|
+
'INTERACTION',
|
|
58
|
+
'FORUMS_EVENT'
|
|
59
|
+
]
|
|
60
|
+
: [
|
|
61
|
+
'GUILDS', // base
|
|
62
|
+
'GUILD_MEMBERS', // base
|
|
63
|
+
'GUILD_MESSAGE_REACTIONS',
|
|
64
|
+
'DIRECT_MESSAGE',
|
|
65
|
+
'INTERACTION',
|
|
66
|
+
'PUBLIC_GUILD_MESSAGES',
|
|
67
|
+
'GROUP_AND_C2C_EVENT'
|
|
68
|
+
],
|
|
67
69
|
is_private: config?.is_private ?? false,
|
|
68
70
|
sandbox: config?.sandbox ?? false,
|
|
69
71
|
secret: config?.secret,
|
package/lib/register.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getConfigValue, useUserHashKey, onProcessor } from 'alemonjs';
|
|
2
|
-
import { AT_MESSAGE_CREATE, GROUP_AT_MESSAGE_CREATE, DIRECT_MESSAGE_CREATE, C2C_MESSAGE_CREATE, MESSAGE_CREATE } from './
|
|
2
|
+
import { AT_MESSAGE_CREATE, GROUP_AT_MESSAGE_CREATE, DIRECT_MESSAGE_CREATE, C2C_MESSAGE_CREATE, MESSAGE_CREATE } from './sends.js';
|
|
3
3
|
import { isGuild } from './utils.js';
|
|
4
4
|
|
|
5
5
|
const platform = 'qq-bot';
|
package/lib/sdk/intents.js
CHANGED
|
@@ -73,16 +73,16 @@ PUBLIC_GUILD_MESSAGES (1 << 30) // 消息事件,此为公域的消息事件
|
|
|
73
73
|
const intentsMap = {
|
|
74
74
|
GUILDS: 1 << 0, // 频道事件
|
|
75
75
|
GUILD_MEMBERS: 1 << 1, // 成员
|
|
76
|
-
GUILD_MESSAGES: 1 << 9, // 消息事件,仅 *私域*
|
|
76
|
+
GUILD_MESSAGES: 1 << 9, // 消息事件,仅 *私域*
|
|
77
77
|
GUILD_MESSAGE_REACTIONS: 1 << 10, // 消息表情表态
|
|
78
78
|
DIRECT_MESSAGE: 1 << 12, // 私信消息
|
|
79
79
|
INTERACTION: 1 << 26, // 互动事件
|
|
80
80
|
// INTERACTION_CREATE: 1 << 26,
|
|
81
81
|
MESSAGE_AUDIT: 1 << 27, // 消息审核
|
|
82
82
|
FORUMS_EVENT: 1 << 28, // 论坛事件,仅 *私域*
|
|
83
|
-
AUDIO_ACTION: 1 << 29, // 音频
|
|
83
|
+
AUDIO_ACTION: 1 << 29, // 音频
|
|
84
84
|
PUBLIC_GUILD_MESSAGES: 1 << 30, // 消息事件,此为公域的消息事件
|
|
85
|
-
GROUP_AND_C2C_EVENT: 1 << 25
|
|
85
|
+
GROUP_AND_C2C_EVENT: 1 << 25 // group all
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
*
|