@alemonjs/qq-bot 2.1.15 → 2.1.17
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/README.md
CHANGED
package/lib/register.js
CHANGED
|
@@ -49,7 +49,14 @@ const register = (client) => {
|
|
|
49
49
|
.addPlatform({ Platform: platform, value: event, BotId: botId })
|
|
50
50
|
.addGuild({ GuildId: event.group_id, SpaceId: `GROUP:${event.group_id}` })
|
|
51
51
|
.addChannel({ ChannelId: event.group_id })
|
|
52
|
-
.addUser({
|
|
52
|
+
.addUser({
|
|
53
|
+
UserId: event.author.id,
|
|
54
|
+
UserKey,
|
|
55
|
+
UserAvatar: UserAvatar,
|
|
56
|
+
UserName: event?.author?.username,
|
|
57
|
+
IsMaster: isMaster,
|
|
58
|
+
IsBot: false
|
|
59
|
+
})
|
|
53
60
|
.addMessage({ MessageId: event.id })
|
|
54
61
|
.addText({ MessageText: event.content?.trim() })
|
|
55
62
|
.addOpen({ OpenId: `C2C:${event.author.member_openid}` })
|
|
@@ -61,7 +68,14 @@ const register = (client) => {
|
|
|
61
68
|
const UserAvatar = createUserAvatarURL(event.author.id);
|
|
62
69
|
cbp.send(FormatEvent.create('private.message.create')
|
|
63
70
|
.addPlatform({ Platform: platform, value: event, BotId: botId })
|
|
64
|
-
.addUser({
|
|
71
|
+
.addUser({
|
|
72
|
+
UserId: event.author.id,
|
|
73
|
+
UserKey,
|
|
74
|
+
UserAvatar: UserAvatar,
|
|
75
|
+
UserName: event?.author?.username,
|
|
76
|
+
IsMaster: isMaster,
|
|
77
|
+
IsBot: false
|
|
78
|
+
})
|
|
65
79
|
.addMessage({ MessageId: event.id })
|
|
66
80
|
.addText({ MessageText: event.content?.trim() })
|
|
67
81
|
.addOpen({ OpenId: `C2C:${event.author.user_openid}` })
|
|
@@ -168,7 +182,13 @@ const register = (client) => {
|
|
|
168
182
|
.addPlatform({ Platform: platform, value: event, BotId: botId })
|
|
169
183
|
.addGuild({ GuildId: event.group_openid, SpaceId: `GROUP:${event.group_openid}` })
|
|
170
184
|
.addChannel({ ChannelId: event.group_openid })
|
|
171
|
-
.addUser({
|
|
185
|
+
.addUser({
|
|
186
|
+
UserId: event.group_member_openid,
|
|
187
|
+
UserKey,
|
|
188
|
+
UserAvatar: UserAvatar,
|
|
189
|
+
IsMaster: isMaster,
|
|
190
|
+
IsBot: false
|
|
191
|
+
})
|
|
172
192
|
.addMessage({ MessageId: `INTERACTION_CREATE:${event.id}` })
|
|
173
193
|
.addText({ MessageText: MessageText })
|
|
174
194
|
.addOpen({ OpenId: `C2C:${event.group_member_openid}` })
|
|
@@ -182,7 +202,13 @@ const register = (client) => {
|
|
|
182
202
|
const MessageText = event.data.resolved.button_data?.trim() || '';
|
|
183
203
|
const e = FormatEvent.create('private.interaction.create')
|
|
184
204
|
.addPlatform({ Platform: platform, value: event, BotId: botId })
|
|
185
|
-
.addUser({
|
|
205
|
+
.addUser({
|
|
206
|
+
UserId: event.user_openid,
|
|
207
|
+
UserKey,
|
|
208
|
+
UserAvatar: UserAvatar,
|
|
209
|
+
IsMaster: isMaster,
|
|
210
|
+
IsBot: false
|
|
211
|
+
})
|
|
186
212
|
.addMessage({ MessageId: event.id })
|
|
187
213
|
.addText({ MessageText: MessageText })
|
|
188
214
|
.addOpen({ OpenId: `C2C:${event.user_openid}` })
|
package/lib/sdk/typing.d.ts
CHANGED
package/lib/sends.js
CHANGED
|
@@ -22,11 +22,15 @@ const createButtonsData = (rows, startId = 0) => {
|
|
|
22
22
|
render_data: {
|
|
23
23
|
label: value,
|
|
24
24
|
visited_label: value,
|
|
25
|
-
style: 0
|
|
25
|
+
style: options.style !== 'blue' ? 0 : 1
|
|
26
26
|
},
|
|
27
27
|
action: {
|
|
28
28
|
type: typeMap[typing],
|
|
29
|
-
permission: {
|
|
29
|
+
permission: {
|
|
30
|
+
type: typeof options.permission?.type === 'undefined' ? 2 : options.permission.type,
|
|
31
|
+
specify_user_ids: options.permission.userIds,
|
|
32
|
+
specify_role_ids: options.permission.roleIds
|
|
33
|
+
},
|
|
30
34
|
unsupport_tips: options?.toolTip ?? '',
|
|
31
35
|
data: options?.data ?? '',
|
|
32
36
|
at_bot_show_channel_list: false,
|