@alemonjs/kook 0.2.0 → 0.2.2
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.d.ts +7 -6
- package/lib/index.js +286 -280
- package/lib/sdk/core/config.js +39 -40
- package/lib/sdk/core/utils/from.js +25 -32
- package/lib/sdk/platform/kook/sdk/api.d.ts +279 -267
- package/lib/sdk/platform/kook/sdk/api.js +262 -265
- package/lib/sdk/platform/kook/sdk/config.js +4 -4
- package/lib/sdk/platform/kook/sdk/conversation.js +108 -116
- package/lib/sdk/platform/kook/sdk/message/INTERACTION.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message/MEMBER_ADD.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message/MEMBER_REMOVE.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message/MESSAGES_DIRECT.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message/MESSAGES_PUBLIC.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message/REACTIONS.d.ts +3 -3
- package/lib/sdk/platform/kook/sdk/message.d.ts +15 -15
- package/lib/sdk/platform/kook/sdk/message.js +16 -16
- package/lib/sdk/platform/kook/sdk/typings.d.ts +167 -138
- package/lib/sdk/platform/kook/sdk/typings.js +164 -164
- package/lib/sdk/platform/kook/sdk/wss.d.ts +22 -22
- package/lib/sdk/platform/kook/sdk/wss.js +138 -145
- package/lib/sdk/platform/kook/sdk/wss.types.d.ts +5 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as alemonjs from 'alemonjs'
|
|
2
|
-
import { KOOKClient } from './sdk/platform/kook/sdk/wss.js'
|
|
1
|
+
import * as alemonjs from 'alemonjs'
|
|
2
|
+
import { KOOKClient } from './sdk/platform/kook/sdk/wss.js'
|
|
3
3
|
|
|
4
|
-
type Client = typeof KOOKClient.prototype
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
4
|
+
type Client = typeof KOOKClient.prototype
|
|
5
|
+
declare const platform = 'kook'
|
|
6
|
+
declare const client: Client
|
|
7
|
+
declare const _default: () => alemonjs.ClientAPI
|
|
7
8
|
|
|
8
|
-
export { type Client, client, _default as default }
|
|
9
|
+
export { type Client, client, _default as default, platform }
|
package/lib/index.js
CHANGED
|
@@ -1,285 +1,291 @@
|
|
|
1
|
-
import { defineBot, getConfigValue, useUserHashKey, OnProcessor } from 'alemonjs'
|
|
2
|
-
import 'fs'
|
|
3
|
-
import 'axios'
|
|
4
|
-
import 'path'
|
|
5
|
-
import 'qrcode'
|
|
6
|
-
import 'public-ip'
|
|
7
|
-
import 'stream'
|
|
8
|
-
import 'file-type'
|
|
9
|
-
import 'form-data'
|
|
10
|
-
import './sdk/platform/kook/sdk/typings.js'
|
|
11
|
-
import { KOOKClient } from './sdk/platform/kook/sdk/wss.js'
|
|
1
|
+
import { defineBot, getConfigValue, useUserHashKey, OnProcessor } from 'alemonjs'
|
|
2
|
+
import 'fs'
|
|
3
|
+
import 'axios'
|
|
4
|
+
import 'path'
|
|
5
|
+
import 'qrcode'
|
|
6
|
+
import 'public-ip'
|
|
7
|
+
import 'stream'
|
|
8
|
+
import 'file-type'
|
|
9
|
+
import 'form-data'
|
|
10
|
+
import './sdk/platform/kook/sdk/typings.js'
|
|
11
|
+
import { KOOKClient } from './sdk/platform/kook/sdk/wss.js'
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const platform = 'kook'
|
|
14
|
+
const client = new Proxy(
|
|
15
|
+
{},
|
|
16
|
+
{
|
|
17
|
+
get: (_, prop) => {
|
|
18
|
+
if (prop in global.client) {
|
|
19
|
+
return global.client[prop]
|
|
20
|
+
}
|
|
21
|
+
return undefined
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
)
|
|
14
25
|
var index = defineBot(() => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return `*${item.value}*`;
|
|
204
|
-
}
|
|
205
|
-
else if (item.options?.style == 'bold') {
|
|
206
|
-
return `**${item.value}**`;
|
|
207
|
-
}
|
|
208
|
-
else if (item.options?.style == 'strikethrough') {
|
|
209
|
-
return `~~${item.value}~~`;
|
|
210
|
-
}
|
|
211
|
-
else if (item.options?.style == 'boldItalic') {
|
|
212
|
-
return `***${item.value}***`;
|
|
213
|
-
}
|
|
214
|
-
return item.value;
|
|
215
|
-
}
|
|
216
|
-
})
|
|
217
|
-
.join('');
|
|
218
|
-
if (content) {
|
|
219
|
-
return Promise.all([content].map(item => client.createMessage({
|
|
220
|
-
type: 9,
|
|
221
|
-
target_id: event.ChannelId,
|
|
222
|
-
content: item
|
|
223
|
-
})));
|
|
224
|
-
}
|
|
225
|
-
const images = val.filter(item => item.type == 'Image').map(item => item.value);
|
|
226
|
-
if (images) {
|
|
227
|
-
return Promise.all(images.map(async (item) => {
|
|
228
|
-
// 上传图片
|
|
229
|
-
const res = await client.postImage(item);
|
|
230
|
-
if (!res)
|
|
231
|
-
return Promise.resolve();
|
|
232
|
-
// 发送消息
|
|
233
|
-
return await client.createMessage({
|
|
234
|
-
type: 2,
|
|
235
|
-
target_id: event.ChannelId,
|
|
236
|
-
content: res.data.url
|
|
237
|
-
});
|
|
238
|
-
}));
|
|
239
|
-
}
|
|
240
|
-
return Promise.all([]);
|
|
241
|
-
},
|
|
242
|
-
mention: async (e) => {
|
|
243
|
-
const event = e.value;
|
|
244
|
-
const MessageMention = [];
|
|
245
|
-
/**
|
|
246
|
-
* 艾特类型所得到的,包括机器人在内
|
|
247
|
-
*/
|
|
248
|
-
const mention_role_part = event.extra.kmarkdown?.mention_role_part ?? [];
|
|
249
|
-
for (const item of mention_role_part) {
|
|
250
|
-
MessageMention.push({
|
|
251
|
-
UserId: item.role_id,
|
|
252
|
-
UserName: item.name,
|
|
253
|
-
UserKey: useUserHashKey({
|
|
254
|
-
Platform,
|
|
255
|
-
UserId: item.role_id
|
|
256
|
-
}),
|
|
257
|
-
IsMaster: false,
|
|
258
|
-
IsBot: true
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* 艾特用户所得到的
|
|
263
|
-
*/
|
|
264
|
-
const mention_part = event.extra.kmarkdown?.mention_part ?? [];
|
|
265
|
-
for (const item of mention_part) {
|
|
266
|
-
MessageMention.push({
|
|
267
|
-
// avatar: item.avatar,
|
|
268
|
-
UserId: item.id,
|
|
269
|
-
UserName: item.username,
|
|
270
|
-
UserKey: useUserHashKey({
|
|
271
|
-
Platform,
|
|
272
|
-
UserId: item.role_id
|
|
273
|
-
}),
|
|
274
|
-
IsMaster: false,
|
|
275
|
-
IsBot: false
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
return MessageMention;
|
|
26
|
+
const value = getConfigValue()
|
|
27
|
+
const config = value?.kook
|
|
28
|
+
if (!config) return
|
|
29
|
+
// 创建客户端
|
|
30
|
+
const client = new KOOKClient({
|
|
31
|
+
token: config.token
|
|
32
|
+
})
|
|
33
|
+
// 连接
|
|
34
|
+
client.connect()
|
|
35
|
+
client.on('MESSAGES_DIRECT', async event => {
|
|
36
|
+
// 过滤机器人
|
|
37
|
+
if (event.extra?.author?.bot) return false
|
|
38
|
+
// 主人
|
|
39
|
+
const master_key = config?.master_key ?? []
|
|
40
|
+
const isMaster = master_key.includes(event.author_id)
|
|
41
|
+
// 头像
|
|
42
|
+
const avatar = event.extra.author.avatar
|
|
43
|
+
// 获取消息
|
|
44
|
+
let msg = event.content
|
|
45
|
+
const url = avatar.substring(0, avatar.indexOf('?'))
|
|
46
|
+
const UserAvatar = {
|
|
47
|
+
toBuffer: async () => {
|
|
48
|
+
const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
|
|
49
|
+
return Buffer.from(arrayBuffer)
|
|
50
|
+
},
|
|
51
|
+
toBase64: async () => {
|
|
52
|
+
const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
|
|
53
|
+
return Buffer.from(arrayBuffer).toString('base64')
|
|
54
|
+
},
|
|
55
|
+
toURL: async () => {
|
|
56
|
+
return url
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const UserId = event.author_id
|
|
60
|
+
const UserKey = useUserHashKey({
|
|
61
|
+
Platform: platform,
|
|
62
|
+
UserId
|
|
63
|
+
})
|
|
64
|
+
// 定义消
|
|
65
|
+
const e = {
|
|
66
|
+
// 事件类型
|
|
67
|
+
Platform: platform,
|
|
68
|
+
// 用户Id
|
|
69
|
+
UserId: UserId,
|
|
70
|
+
UserKey,
|
|
71
|
+
UserName: event.extra.author.username,
|
|
72
|
+
UserAvatar: UserAvatar,
|
|
73
|
+
IsMaster: isMaster,
|
|
74
|
+
IsBot: false,
|
|
75
|
+
// message
|
|
76
|
+
MessageId: event.msg_id,
|
|
77
|
+
MessageText: msg,
|
|
78
|
+
OpenId: '',
|
|
79
|
+
CreateAt: Date.now(),
|
|
80
|
+
//
|
|
81
|
+
tag: 'MESSAGES_PUBLIC',
|
|
82
|
+
value: null
|
|
83
|
+
}
|
|
84
|
+
// 当访问的时候获取
|
|
85
|
+
Object.defineProperty(e, 'value', {
|
|
86
|
+
get() {
|
|
87
|
+
return event
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
// 处理消息
|
|
91
|
+
OnProcessor(e, 'private.message.create')
|
|
92
|
+
})
|
|
93
|
+
// 监听消息
|
|
94
|
+
client.on('MESSAGES_PUBLIC', async event => {
|
|
95
|
+
// 过滤机器人
|
|
96
|
+
if (event.extra?.author?.bot) return false
|
|
97
|
+
// 创建私聊标记
|
|
98
|
+
const data = await client.userChatCreate(event.extra.author.id).then(res => res?.data)
|
|
99
|
+
// 主人
|
|
100
|
+
const master_key = config?.master_key ?? []
|
|
101
|
+
const isMaster = master_key.includes(event.author_id)
|
|
102
|
+
// 头像
|
|
103
|
+
const avatar = event.extra.author.avatar
|
|
104
|
+
// 获取消息
|
|
105
|
+
let msg = event.content
|
|
106
|
+
/**
|
|
107
|
+
* 艾特类型所得到的
|
|
108
|
+
* 包括机器人在内
|
|
109
|
+
*/
|
|
110
|
+
const mention_role_part = event.extra.kmarkdown?.mention_role_part ?? []
|
|
111
|
+
for (const item of mention_role_part) {
|
|
112
|
+
msg = msg.replace(`(rol)${item.role_id}(rol)`, '').trim()
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 艾特用户所得到的
|
|
116
|
+
*/
|
|
117
|
+
const mention_part = event.extra.kmarkdown?.mention_part ?? []
|
|
118
|
+
for (const item of mention_part) {
|
|
119
|
+
msg = msg.replace(`(met)${item.id}(met)`, '').trim()
|
|
120
|
+
}
|
|
121
|
+
const url = avatar.substring(0, avatar.indexOf('?'))
|
|
122
|
+
const UserAvatar = {
|
|
123
|
+
toBuffer: async () => {
|
|
124
|
+
const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
|
|
125
|
+
return Buffer.from(arrayBuffer)
|
|
126
|
+
},
|
|
127
|
+
toBase64: async () => {
|
|
128
|
+
const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
|
|
129
|
+
return Buffer.from(arrayBuffer).toString('base64')
|
|
130
|
+
},
|
|
131
|
+
toURL: async () => {
|
|
132
|
+
return url
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const UserId = event.author_id
|
|
136
|
+
const UserKey = useUserHashKey({
|
|
137
|
+
Platform: platform,
|
|
138
|
+
UserId
|
|
139
|
+
})
|
|
140
|
+
// 定义消
|
|
141
|
+
const e = {
|
|
142
|
+
// 事件类型
|
|
143
|
+
Platform: platform,
|
|
144
|
+
//
|
|
145
|
+
GuildId: event.extra.guild_id,
|
|
146
|
+
ChannelId: event.target_id,
|
|
147
|
+
// 用户Id
|
|
148
|
+
UserId: UserId,
|
|
149
|
+
UserKey,
|
|
150
|
+
UserName: event.extra.author.username,
|
|
151
|
+
UserAvatar: UserAvatar,
|
|
152
|
+
IsMaster: isMaster,
|
|
153
|
+
IsBot: false,
|
|
154
|
+
// message
|
|
155
|
+
MessageId: event.msg_id,
|
|
156
|
+
MessageText: msg,
|
|
157
|
+
OpenId: data?.code,
|
|
158
|
+
CreateAt: Date.now(),
|
|
159
|
+
//
|
|
160
|
+
tag: 'MESSAGES_PUBLIC',
|
|
161
|
+
value: null
|
|
162
|
+
}
|
|
163
|
+
// 当访问的时候获取
|
|
164
|
+
Object.defineProperty(e, 'value', {
|
|
165
|
+
get() {
|
|
166
|
+
return event
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
// 处理消息
|
|
170
|
+
OnProcessor(e, 'message.create')
|
|
171
|
+
})
|
|
172
|
+
// 发送错误时
|
|
173
|
+
client.on('ERROR', msg => {
|
|
174
|
+
console.error(msg)
|
|
175
|
+
})
|
|
176
|
+
// 客户端全局化。
|
|
177
|
+
global.client = client
|
|
178
|
+
return {
|
|
179
|
+
api: {
|
|
180
|
+
use: {
|
|
181
|
+
send: (event, val) => {
|
|
182
|
+
if (val.length < 0) return Promise.all([])
|
|
183
|
+
const content = val
|
|
184
|
+
.filter(item => item.type == 'Link' || item.type == 'Mention' || item.type == 'Text')
|
|
185
|
+
.map(item => {
|
|
186
|
+
if (item.type == 'Link') {
|
|
187
|
+
return `[${item.options?.title ?? item.value}](${item.value})`
|
|
188
|
+
} else if (item.type == 'Mention') {
|
|
189
|
+
if (
|
|
190
|
+
item.value == 'everyone' ||
|
|
191
|
+
item.value == 'all' ||
|
|
192
|
+
item.value == '' ||
|
|
193
|
+
typeof item.value != 'string'
|
|
194
|
+
) {
|
|
195
|
+
return `(met)all(met)`
|
|
196
|
+
}
|
|
197
|
+
if (item.options?.belong == 'user') {
|
|
198
|
+
return `(met)${item.value}(met)`
|
|
199
|
+
} else if (item.options?.belong == 'channel') {
|
|
200
|
+
return `(chn)${item.value}(chn)`
|
|
201
|
+
}
|
|
202
|
+
return ''
|
|
203
|
+
} else if (item.type == 'Text') {
|
|
204
|
+
if (item.options?.style == 'block') {
|
|
205
|
+
return `\`${item.value}\``
|
|
206
|
+
} else if (item.options?.style == 'italic') {
|
|
207
|
+
return `*${item.value}*`
|
|
208
|
+
} else if (item.options?.style == 'bold') {
|
|
209
|
+
return `**${item.value}**`
|
|
210
|
+
} else if (item.options?.style == 'strikethrough') {
|
|
211
|
+
return `~~${item.value}~~`
|
|
212
|
+
} else if (item.options?.style == 'boldItalic') {
|
|
213
|
+
return `***${item.value}***`
|
|
279
214
|
}
|
|
280
|
-
|
|
215
|
+
return item.value
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
.join('')
|
|
219
|
+
if (content) {
|
|
220
|
+
return Promise.all(
|
|
221
|
+
[content].map(item =>
|
|
222
|
+
client.createMessage({
|
|
223
|
+
type: 9,
|
|
224
|
+
target_id: event.ChannelId,
|
|
225
|
+
content: item
|
|
226
|
+
})
|
|
227
|
+
)
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
const images = val.filter(item => item.type == 'Image').map(item => item.value)
|
|
231
|
+
if (images) {
|
|
232
|
+
return Promise.all(
|
|
233
|
+
images.map(async item => {
|
|
234
|
+
// 上传图片
|
|
235
|
+
const res = await client.postImage(item)
|
|
236
|
+
if (!res) return Promise.resolve()
|
|
237
|
+
// 发送消息
|
|
238
|
+
return await client.createMessage({
|
|
239
|
+
type: 2,
|
|
240
|
+
target_id: event.ChannelId,
|
|
241
|
+
content: res.data.url
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
return Promise.all([])
|
|
247
|
+
},
|
|
248
|
+
mention: async e => {
|
|
249
|
+
const event = e.value
|
|
250
|
+
const MessageMention = []
|
|
251
|
+
/**
|
|
252
|
+
* 艾特类型所得到的,包括机器人在内
|
|
253
|
+
*/
|
|
254
|
+
const mention_role_part = event.extra.kmarkdown?.mention_role_part ?? []
|
|
255
|
+
for (const item of mention_role_part) {
|
|
256
|
+
MessageMention.push({
|
|
257
|
+
UserId: item.role_id,
|
|
258
|
+
UserName: item.name,
|
|
259
|
+
UserKey: useUserHashKey({
|
|
260
|
+
Platform: platform,
|
|
261
|
+
UserId: item.role_id
|
|
262
|
+
}),
|
|
263
|
+
IsMaster: false,
|
|
264
|
+
IsBot: true
|
|
265
|
+
})
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* 艾特用户所得到的
|
|
269
|
+
*/
|
|
270
|
+
const mention_part = event.extra.kmarkdown?.mention_part ?? []
|
|
271
|
+
for (const item of mention_part) {
|
|
272
|
+
MessageMention.push({
|
|
273
|
+
// avatar: item.avatar,
|
|
274
|
+
UserId: item.id,
|
|
275
|
+
UserName: item.username,
|
|
276
|
+
UserKey: useUserHashKey({
|
|
277
|
+
Platform: platform,
|
|
278
|
+
UserId: item.role_id
|
|
279
|
+
}),
|
|
280
|
+
IsMaster: false,
|
|
281
|
+
IsBot: false
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
return MessageMention
|
|
281
285
|
}
|
|
282
|
-
|
|
283
|
-
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
})
|
|
284
290
|
|
|
285
|
-
export { client, index as default }
|
|
291
|
+
export { client, index as default, platform }
|