@alemonjs/discord 2.1.0-alpha.2 → 2.1.0-alpha.20
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 +16 -2
- package/lib/config.d.ts +14 -0
- package/lib/config.js +21 -0
- package/lib/desktop.d.ts +1 -3
- package/lib/desktop.js +4 -12
- package/lib/hook.d.ts +27 -0
- package/lib/hook.js +14 -0
- package/lib/index.d.ts +6 -4
- package/lib/index.js +102 -134
- package/lib/sdk/api.d.ts +147 -971
- package/lib/sdk/api.js +336 -1076
- package/lib/sdk/createPicFrom.d.ts +6 -0
- package/lib/sdk/{core/from.js → createPicFrom.js} +8 -13
- package/lib/sdk/instance.d.ts +3 -0
- package/lib/sdk/instance.js +93 -0
- package/lib/sdk/intents.d.ts +2 -0
- package/lib/sdk/intents.js +0 -121
- package/lib/sdk/message/CHANNEL_TOPIC_UPDATE.d.ts +5 -11
- package/lib/sdk/message/CHANNEL_TOPIC_UPDATE.js +1 -0
- package/lib/sdk/message/CHANNEL_UPDATE.d.ts +42 -48
- package/lib/sdk/message/CHANNEL_UPDATE.js +1 -0
- package/lib/sdk/message/GUILD_MEMBER_ADD.d.ts +23 -28
- package/lib/sdk/message/GUILD_MEMBER_ADD.js +1 -0
- package/lib/sdk/message/GUILD_MEMBER_REMOVE.d.ts +12 -18
- package/lib/sdk/message/GUILD_MEMBER_REMOVE.js +1 -0
- package/lib/sdk/message/GUILD_MEMBER_UPDATE.d.ts +27 -33
- package/lib/sdk/message/GUILD_MEMBER_UPDATE.js +1 -0
- package/lib/sdk/message/INTERACTION_CREATE.d.ts +113 -114
- package/lib/sdk/message/INTERACTION_CREATE.js +1 -0
- package/lib/sdk/message/MESSAGE_CREATE.d.ts +53 -59
- package/lib/sdk/message/MESSAGE_CREATE.js +1 -0
- package/lib/sdk/message/MESSAGE_DELETE.d.ts +5 -11
- package/lib/sdk/message/MESSAGE_DELETE.js +1 -0
- package/lib/sdk/message/MESSAGE_REACTION_ADD.d.ts +36 -42
- package/lib/sdk/message/MESSAGE_REACTION_ADD.js +1 -0
- package/lib/sdk/message/MESSAGE_UPDATE.d.ts +50 -56
- package/lib/sdk/message/MESSAGE_UPDATE.js +1 -0
- package/lib/sdk/message/PRESENCE_UPDATE.d.ts +56 -68
- package/lib/sdk/message/PRESENCE_UPDATE.js +1 -0
- package/lib/sdk/message/READY.d.ts +7 -9
- package/lib/sdk/message/READY.js +1 -0
- package/lib/sdk/message/TYPING_START.d.ts +29 -35
- package/lib/sdk/message/TYPING_START.js +1 -0
- package/lib/sdk/message/VOICE_CHANNEL_STATUS_UPDATE.d.ts +5 -10
- package/lib/sdk/message/VOICE_CHANNEL_STATUS_UPDATE.js +1 -0
- package/lib/sdk/message/VOICE_STATE_UPDATE.d.ts +36 -41
- package/lib/sdk/message/VOICE_STATE_UPDATE.js +1 -0
- package/lib/sdk/message.d.ts +93 -101
- package/lib/sdk/message.js +1 -0
- package/lib/sdk/types.d.ts +2 -5
- package/lib/sdk/typings.d.ts +190 -0
- package/lib/sdk/typings.js +1 -0
- package/lib/sdk/wss.d.ts +7 -26
- package/lib/sdk/wss.js +109 -162
- package/lib/sdk/wss.types.d.ts +6 -29
- package/lib/sdk/wss.types.js +1 -0
- package/lib/send.d.ts +11 -0
- package/lib/send.js +168 -92
- package/package.json +16 -8
- package/lib/env.js +0 -1
- package/lib/sdk/config.js +0 -10
- package/lib/sdk/core/config.js +0 -46
|
@@ -3,34 +3,29 @@ import { Readable, isReadable } from 'stream';
|
|
|
3
3
|
import { basename } from 'path';
|
|
4
4
|
import { fileTypeFromBuffer, fileTypeFromStream } from 'file-type';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* 创建form
|
|
8
|
-
* @param image
|
|
9
|
-
* @param name
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
6
|
async function createPicFrom(image, name = 'image.jpg') {
|
|
13
7
|
let picData;
|
|
14
|
-
// 是 string
|
|
15
8
|
if (typeof image === 'string') {
|
|
16
|
-
if (!existsSync(image))
|
|
9
|
+
if (!existsSync(image)) {
|
|
17
10
|
return false;
|
|
18
|
-
|
|
11
|
+
}
|
|
12
|
+
if (!name) {
|
|
19
13
|
name = basename(image);
|
|
14
|
+
}
|
|
20
15
|
picData = createReadStream(image);
|
|
21
|
-
// 是 buffer
|
|
22
16
|
}
|
|
23
17
|
else if (Buffer.isBuffer(image)) {
|
|
24
|
-
if (!name)
|
|
18
|
+
if (!name) {
|
|
25
19
|
name = 'file.' + (await fileTypeFromBuffer(image)).ext;
|
|
20
|
+
}
|
|
26
21
|
picData = new Readable();
|
|
27
22
|
picData.push(image);
|
|
28
23
|
picData.push(null);
|
|
29
|
-
// 是 文件流
|
|
30
24
|
}
|
|
31
25
|
else if (isReadable(image)) {
|
|
32
|
-
if (!name)
|
|
26
|
+
if (!name) {
|
|
33
27
|
name = 'file.' + (await fileTypeFromStream(image)).ext;
|
|
28
|
+
}
|
|
34
29
|
picData = image;
|
|
35
30
|
}
|
|
36
31
|
else {
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const filterHeaders = (headers = {}) => {
|
|
2
|
+
if (!headers) {
|
|
3
|
+
return headers;
|
|
4
|
+
}
|
|
5
|
+
const filtered = {};
|
|
6
|
+
const sensitiveKeys = [/^authorization$/i, /^cookie$/i, /^set-cookie$/i, /token/i, /key/i, /jwt/i, /^session[-_]id$/i, /^uid$/i, /^user[-_]id$/i];
|
|
7
|
+
for (const key in headers) {
|
|
8
|
+
if (/^_/.test(key)) {
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
if (typeof key === 'symbol') {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
if (typeof headers[key] === 'function') {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (sensitiveKeys.some(re => re.test(key))) {
|
|
18
|
+
filtered[key] = '******';
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
filtered[key] = headers[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return filtered;
|
|
25
|
+
};
|
|
26
|
+
const filterConfig = (config = {}) => {
|
|
27
|
+
if (!config) {
|
|
28
|
+
return config;
|
|
29
|
+
}
|
|
30
|
+
const filtered = {};
|
|
31
|
+
for (const key in config) {
|
|
32
|
+
if (/^_/.test(key)) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (typeof key === 'symbol') {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (typeof config[key] === 'function') {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
filtered[key] = config[key];
|
|
42
|
+
}
|
|
43
|
+
return filtered;
|
|
44
|
+
};
|
|
45
|
+
const filterRequest = (request = {}) => {
|
|
46
|
+
if (!request) {
|
|
47
|
+
return request;
|
|
48
|
+
}
|
|
49
|
+
const filtered = {};
|
|
50
|
+
for (const key in request) {
|
|
51
|
+
if (/^_/.test(key)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (typeof key === 'symbol') {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (typeof request[key] === 'function') {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
filtered[key] = request[key];
|
|
61
|
+
}
|
|
62
|
+
return filtered;
|
|
63
|
+
};
|
|
64
|
+
const loggerError = err => {
|
|
65
|
+
logger.error('[axios] error', {
|
|
66
|
+
config: {
|
|
67
|
+
headers: filterHeaders(err?.config?.headers),
|
|
68
|
+
params: err?.config?.params,
|
|
69
|
+
data: err?.config?.data
|
|
70
|
+
},
|
|
71
|
+
response: {
|
|
72
|
+
status: err?.response?.status,
|
|
73
|
+
statusText: err?.response?.statusText,
|
|
74
|
+
headers: filterHeaders(err?.response?.headers),
|
|
75
|
+
config: filterConfig(err?.response?.config),
|
|
76
|
+
request: filterRequest(err?.response?.request),
|
|
77
|
+
data: err?.response?.data
|
|
78
|
+
},
|
|
79
|
+
message: err?.message
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
const createAxiosInstance = async (service, options) => {
|
|
83
|
+
try {
|
|
84
|
+
const res = await service(options);
|
|
85
|
+
return res?.data ?? {};
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
loggerError(err);
|
|
89
|
+
throw err?.response?.data ?? err;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { createAxiosInstance };
|
package/lib/sdk/intents.js
CHANGED
|
@@ -1,119 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GUILDS (1 << 0)
|
|
3
|
-
- GUILD_CREATE
|
|
4
|
-
- GUILD_UPDATE
|
|
5
|
-
- GUILD_DELETE
|
|
6
|
-
- GUILD_ROLE_CREATE
|
|
7
|
-
- GUILD_ROLE_UPDATE
|
|
8
|
-
- GUILD_ROLE_DELETE
|
|
9
|
-
- CHANNEL_CREATE
|
|
10
|
-
- CHANNEL_UPDATE
|
|
11
|
-
- CHANNEL_DELETE
|
|
12
|
-
- CHANNEL_PINS_UPDATE
|
|
13
|
-
- THREAD_CREATE
|
|
14
|
-
- THREAD_UPDATE
|
|
15
|
-
- THREAD_DELETE
|
|
16
|
-
- THREAD_LIST_SYNC
|
|
17
|
-
- THREAD_MEMBER_UPDATE
|
|
18
|
-
- THREAD_MEMBERS_UPDATE *
|
|
19
|
-
- STAGE_INSTANCE_CREATE
|
|
20
|
-
- STAGE_INSTANCE_UPDATE
|
|
21
|
-
- STAGE_INSTANCE_DELETE
|
|
22
|
-
|
|
23
|
-
GUILD_MEMBERS (1 << 1) **
|
|
24
|
-
- GUILD_MEMBER_ADD
|
|
25
|
-
- GUILD_MEMBER_UPDATE
|
|
26
|
-
- GUILD_MEMBER_REMOVE
|
|
27
|
-
- THREAD_MEMBERS_UPDATE *
|
|
28
|
-
|
|
29
|
-
GUILD_MODERATION (1 << 2)
|
|
30
|
-
- GUILD_AUDIT_LOG_ENTRY_CREATE
|
|
31
|
-
- GUILD_BAN_ADD
|
|
32
|
-
- GUILD_BAN_REMOVE
|
|
33
|
-
|
|
34
|
-
GUILD_EXPRESSIONS (1 << 3)
|
|
35
|
-
- GUILD_EMOJIS_UPDATE
|
|
36
|
-
- GUILD_STICKERS_UPDATE
|
|
37
|
-
- GUILD_SOUNDBOARD_SOUND_CREATE
|
|
38
|
-
- GUILD_SOUNDBOARD_SOUND_UPDATE
|
|
39
|
-
- GUILD_SOUNDBOARD_SOUND_DELETE
|
|
40
|
-
- GUILD_SOUNDBOARD_SOUNDS_UPDATE
|
|
41
|
-
|
|
42
|
-
GUILD_INTEGRATIONS (1 << 4)
|
|
43
|
-
- GUILD_INTEGRATIONS_UPDATE
|
|
44
|
-
- INTEGRATION_CREATE
|
|
45
|
-
- INTEGRATION_UPDATE
|
|
46
|
-
- INTEGRATION_DELETE
|
|
47
|
-
|
|
48
|
-
GUILD_WEBHOOKS (1 << 5)
|
|
49
|
-
- WEBHOOKS_UPDATE
|
|
50
|
-
|
|
51
|
-
GUILD_INVITES (1 << 6)
|
|
52
|
-
- INVITE_CREATE
|
|
53
|
-
- INVITE_DELETE
|
|
54
|
-
|
|
55
|
-
GUILD_VOICE_STATES (1 << 7)
|
|
56
|
-
- VOICE_CHANNEL_EFFECT_SEND
|
|
57
|
-
- VOICE_STATE_UPDATE
|
|
58
|
-
|
|
59
|
-
GUILD_PRESENCES (1 << 8) **
|
|
60
|
-
- PRESENCE_UPDATE
|
|
61
|
-
|
|
62
|
-
GUILD_MESSAGES (1 << 9)
|
|
63
|
-
- MESSAGE_CREATE
|
|
64
|
-
- MESSAGE_UPDATE
|
|
65
|
-
- MESSAGE_DELETE
|
|
66
|
-
- MESSAGE_DELETE_BULK
|
|
67
|
-
|
|
68
|
-
GUILD_MESSAGE_REACTIONS (1 << 10)
|
|
69
|
-
- MESSAGE_REACTION_ADD
|
|
70
|
-
- MESSAGE_REACTION_REMOVE
|
|
71
|
-
- MESSAGE_REACTION_REMOVE_ALL
|
|
72
|
-
- MESSAGE_REACTION_REMOVE_EMOJI
|
|
73
|
-
|
|
74
|
-
GUILD_MESSAGE_TYPING (1 << 11)
|
|
75
|
-
- TYPING_START
|
|
76
|
-
|
|
77
|
-
DIRECT_MESSAGES (1 << 12)
|
|
78
|
-
- MESSAGE_CREATE
|
|
79
|
-
- MESSAGE_UPDATE
|
|
80
|
-
- MESSAGE_DELETE
|
|
81
|
-
- CHANNEL_PINS_UPDATE
|
|
82
|
-
|
|
83
|
-
DIRECT_MESSAGE_REACTIONS (1 << 13)
|
|
84
|
-
- MESSAGE_REACTION_ADD
|
|
85
|
-
- MESSAGE_REACTION_REMOVE
|
|
86
|
-
- MESSAGE_REACTION_REMOVE_ALL
|
|
87
|
-
- MESSAGE_REACTION_REMOVE_EMOJI
|
|
88
|
-
|
|
89
|
-
DIRECT_MESSAGE_TYPING (1 << 14)
|
|
90
|
-
- TYPING_START
|
|
91
|
-
|
|
92
|
-
MESSAGE_CONTENT (1 << 15) ***
|
|
93
|
-
|
|
94
|
-
GUILD_SCHEDULED_EVENTS (1 << 16)
|
|
95
|
-
- GUILD_SCHEDULED_EVENT_CREATE
|
|
96
|
-
- GUILD_SCHEDULED_EVENT_UPDATE
|
|
97
|
-
- GUILD_SCHEDULED_EVENT_DELETE
|
|
98
|
-
- GUILD_SCHEDULED_EVENT_USER_ADD
|
|
99
|
-
- GUILD_SCHEDULED_EVENT_USER_REMOVE
|
|
100
|
-
|
|
101
|
-
AUTO_MODERATION_CONFIGURATION (1 << 20)
|
|
102
|
-
- AUTO_MODERATION_RULE_CREATE
|
|
103
|
-
- AUTO_MODERATION_RULE_UPDATE
|
|
104
|
-
- AUTO_MODERATION_RULE_DELETE
|
|
105
|
-
|
|
106
|
-
AUTO_MODERATION_EXECUTION (1 << 21)
|
|
107
|
-
- AUTO_MODERATION_ACTION_EXECUTION
|
|
108
|
-
|
|
109
|
-
GUILD_MESSAGE_POLLS (1 << 24)
|
|
110
|
-
- MESSAGE_POLL_VOTE_ADD
|
|
111
|
-
- MESSAGE_POLL_VOTE_REMOVE
|
|
112
|
-
|
|
113
|
-
DIRECT_MESSAGE_POLLS (1 << 25)
|
|
114
|
-
- MESSAGE_POLL_VOTE_ADD
|
|
115
|
-
- MESSAGE_POLL_VOTE_REMOVE
|
|
116
|
-
*/
|
|
117
1
|
const DCIntentsMap = {
|
|
118
2
|
GUILDS: 1 << 0,
|
|
119
3
|
GUILD_MEMBERS: 1 << 1,
|
|
@@ -137,11 +21,6 @@ const DCIntentsMap = {
|
|
|
137
21
|
GUILD_MESSAGE_POLLS: 1 << 24,
|
|
138
22
|
DIRECT_MESSAGE_POLLS: 1 << 25
|
|
139
23
|
};
|
|
140
|
-
/**
|
|
141
|
-
*
|
|
142
|
-
* @param intents
|
|
143
|
-
* @returns
|
|
144
|
-
*/
|
|
145
24
|
function getIntents(intents) {
|
|
146
25
|
let result = 0;
|
|
147
26
|
for (const intent of intents) {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
topic: null
|
|
7
|
-
id: string
|
|
8
|
-
guild_id: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type { CHANNEL_TOPIC_UPDATE_TYPE }
|
|
1
|
+
export type CHANNEL_TOPIC_UPDATE_TYPE = {
|
|
2
|
+
topic: null;
|
|
3
|
+
id: string;
|
|
4
|
+
guild_id: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,48 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
guild_id: string
|
|
44
|
-
flags: number
|
|
45
|
-
bitrate: number
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type { CHANNEL_UPDATE_TYPE }
|
|
1
|
+
export type CHANNEL_UPDATE_TYPE = {
|
|
2
|
+
version: number;
|
|
3
|
+
user_limit: number;
|
|
4
|
+
type: number;
|
|
5
|
+
rtc_region: null;
|
|
6
|
+
rate_limit_per_user: number;
|
|
7
|
+
position: number;
|
|
8
|
+
permission_overwrites: [
|
|
9
|
+
{
|
|
10
|
+
type: number;
|
|
11
|
+
id: string;
|
|
12
|
+
deny: string;
|
|
13
|
+
allow: string;
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: number;
|
|
17
|
+
id: string;
|
|
18
|
+
deny: string;
|
|
19
|
+
allow: string;
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: number;
|
|
23
|
+
id: string;
|
|
24
|
+
deny: string;
|
|
25
|
+
allow: string;
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: number;
|
|
29
|
+
id: string;
|
|
30
|
+
deny: string;
|
|
31
|
+
allow: string;
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
parent_id: null;
|
|
35
|
+
nsfw: false;
|
|
36
|
+
name: string;
|
|
37
|
+
last_message_id: null;
|
|
38
|
+
id: string;
|
|
39
|
+
guild_id: string;
|
|
40
|
+
flags: number;
|
|
41
|
+
bitrate: number;
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
communication_disabled_until: null
|
|
25
|
-
avatar: null
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type { GUILD_MEMBER_ADD_TYPE }
|
|
1
|
+
export type GUILD_MEMBER_ADD_TYPE = {
|
|
2
|
+
user: {
|
|
3
|
+
username: string;
|
|
4
|
+
public_flags: number;
|
|
5
|
+
id: string;
|
|
6
|
+
global_name: string;
|
|
7
|
+
discriminator: string;
|
|
8
|
+
avatar_decoration_data: null;
|
|
9
|
+
avatar: string;
|
|
10
|
+
};
|
|
11
|
+
unusual_dm_activity_until: null;
|
|
12
|
+
roles: any[];
|
|
13
|
+
premium_since: null;
|
|
14
|
+
pending: boolean;
|
|
15
|
+
nick: null;
|
|
16
|
+
mute: boolean;
|
|
17
|
+
joined_at: string;
|
|
18
|
+
guild_id: string;
|
|
19
|
+
flags: number;
|
|
20
|
+
deaf: boolean;
|
|
21
|
+
communication_disabled_until: null;
|
|
22
|
+
avatar: null;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
avatar: string
|
|
14
|
-
}
|
|
15
|
-
guild_id: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type { GUILD_MEMBER_REMOVE_TYPE }
|
|
1
|
+
export type GUILD_MEMBER_REMOVE_TYPE = {
|
|
2
|
+
user: {
|
|
3
|
+
username: string;
|
|
4
|
+
public_flags: number;
|
|
5
|
+
id: string;
|
|
6
|
+
global_name: string;
|
|
7
|
+
discriminator: string;
|
|
8
|
+
avatar_decoration_data: null;
|
|
9
|
+
avatar: string;
|
|
10
|
+
};
|
|
11
|
+
guild_id: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
deaf: boolean
|
|
29
|
-
communication_disabled_until: null
|
|
30
|
-
avatar: null
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type { GUILD_MEMBER_UPDATE_TYPE }
|
|
1
|
+
export type GUILD_MEMBER_UPDATE_TYPE = {
|
|
2
|
+
user: {
|
|
3
|
+
username: string;
|
|
4
|
+
public_flags: number;
|
|
5
|
+
id: string;
|
|
6
|
+
global_name: string;
|
|
7
|
+
display_name: string;
|
|
8
|
+
discriminator: string;
|
|
9
|
+
bot: boolean;
|
|
10
|
+
avatar_decoration_data: {
|
|
11
|
+
sku_id: string;
|
|
12
|
+
asset: string;
|
|
13
|
+
};
|
|
14
|
+
avatar: string;
|
|
15
|
+
};
|
|
16
|
+
roles: string[];
|
|
17
|
+
premium_since: null;
|
|
18
|
+
pending: boolean;
|
|
19
|
+
nick: null;
|
|
20
|
+
mute: boolean;
|
|
21
|
+
joined_at: string;
|
|
22
|
+
guild_id: string;
|
|
23
|
+
flags: number;
|
|
24
|
+
deaf: boolean;
|
|
25
|
+
communication_disabled_until: null;
|
|
26
|
+
avatar: null;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|