@alemonjs/discord 0.2.7 → 0.2.9
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 +5 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index.js +10 -30
- package/lib/desktop.d.ts +2 -2
- package/lib/desktop.js +54 -55
- package/lib/index.d.ts +7 -6
- package/lib/index.js +201 -86
- package/lib/sdk/platform/discord/sdk/api.d.ts +889 -907
- package/lib/sdk/platform/discord/sdk/api.js +5 -2
- package/lib/sdk/platform/discord/sdk/message/CHANNEL_TOPIC_UPDATE.d.ts +5 -5
- package/lib/sdk/platform/discord/sdk/message/CHANNEL_UPDATE.d.ts +42 -42
- package/lib/sdk/platform/discord/sdk/message/GUILD_MEMBER_ADD.d.ts +23 -23
- package/lib/sdk/platform/discord/sdk/message/GUILD_MEMBER_REMOVE.d.ts +12 -12
- package/lib/sdk/platform/discord/sdk/message/GUILD_MEMBER_UPDATE.d.ts +27 -27
- package/lib/sdk/platform/discord/sdk/message/MESSAGE_CREATE.d.ts +53 -53
- package/lib/sdk/platform/discord/sdk/message/MESSAGE_DELETE.d.ts +5 -5
- package/lib/sdk/platform/discord/sdk/message/MESSAGE_REACTION_ADD.d.ts +36 -36
- package/lib/sdk/platform/discord/sdk/message/MESSAGE_UPDATE.d.ts +50 -50
- package/lib/sdk/platform/discord/sdk/message/PRESENCE_UPDATE.d.ts +56 -62
- package/lib/sdk/platform/discord/sdk/message/READY.d.ts +7 -7
- package/lib/sdk/platform/discord/sdk/message/TYPING_START.d.ts +29 -29
- package/lib/sdk/platform/discord/sdk/message/VOICE_CHANNEL_STATUS_UPDATE.d.ts +5 -5
- package/lib/sdk/platform/discord/sdk/message/VOICE_STATE_UPDATE.d.ts +36 -36
- package/lib/sdk/platform/discord/sdk/message.d.ts +31 -31
- package/lib/sdk/platform/discord/sdk/types.d.ts +3 -23
- package/lib/sdk/platform/discord/sdk/wss.d.ts +23 -23
- package/lib/sdk/platform/discord/sdk/wss.types.d.ts +17 -17
- package/package.json +1 -1
|
@@ -253,10 +253,13 @@ class DCAPI {
|
|
|
253
253
|
* 创建DM
|
|
254
254
|
* *********
|
|
255
255
|
*/
|
|
256
|
-
async userMeChannels() {
|
|
256
|
+
async userMeChannels(recipient_id) {
|
|
257
257
|
return this.request({
|
|
258
258
|
method: 'post',
|
|
259
|
-
url: `/user/@me/channels
|
|
259
|
+
url: `/user/@me/channels`,
|
|
260
|
+
data: {
|
|
261
|
+
recipient_id
|
|
262
|
+
}
|
|
260
263
|
}).then(res => res?.data);
|
|
261
264
|
}
|
|
262
265
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type CHANNEL_TOPIC_UPDATE_TYPE = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
6
|
+
topic: null;
|
|
7
|
+
id: string;
|
|
8
|
+
guild_id: string;
|
|
9
|
+
};
|
|
10
10
|
|
|
11
|
-
export type { CHANNEL_TOPIC_UPDATE_TYPE }
|
|
11
|
+
export type { CHANNEL_TOPIC_UPDATE_TYPE };
|
|
@@ -3,46 +3,46 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type CHANNEL_UPDATE_TYPE = {
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
6
|
+
version: number;
|
|
7
|
+
user_limit: number;
|
|
8
|
+
type: number;
|
|
9
|
+
rtc_region: null;
|
|
10
|
+
rate_limit_per_user: number;
|
|
11
|
+
position: number;
|
|
12
|
+
permission_overwrites: [
|
|
13
|
+
{
|
|
14
|
+
type: number;
|
|
15
|
+
id: string;
|
|
16
|
+
deny: string;
|
|
17
|
+
allow: string;
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: number;
|
|
21
|
+
id: string;
|
|
22
|
+
deny: string;
|
|
23
|
+
allow: string;
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: number;
|
|
27
|
+
id: string;
|
|
28
|
+
deny: string;
|
|
29
|
+
allow: string;
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: number;
|
|
33
|
+
id: string;
|
|
34
|
+
deny: string;
|
|
35
|
+
allow: string;
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
parent_id: null;
|
|
39
|
+
nsfw: false;
|
|
40
|
+
name: string;
|
|
41
|
+
last_message_id: null;
|
|
42
|
+
id: string;
|
|
43
|
+
guild_id: string;
|
|
44
|
+
flags: number;
|
|
45
|
+
bitrate: number;
|
|
46
|
+
};
|
|
47
47
|
|
|
48
|
-
export type { CHANNEL_UPDATE_TYPE }
|
|
48
|
+
export type { CHANNEL_UPDATE_TYPE };
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
* 频道 成员 增加
|
|
3
3
|
*/
|
|
4
4
|
type GUILD_MEMBER_ADD_TYPE = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
5
|
+
user: {
|
|
6
|
+
username: string;
|
|
7
|
+
public_flags: number;
|
|
8
|
+
id: string;
|
|
9
|
+
global_name: string;
|
|
10
|
+
discriminator: string;
|
|
11
|
+
avatar_decoration_data: null;
|
|
12
|
+
avatar: string;
|
|
13
|
+
};
|
|
14
|
+
unusual_dm_activity_until: null;
|
|
15
|
+
roles: any[];
|
|
16
|
+
premium_since: null;
|
|
17
|
+
pending: boolean;
|
|
18
|
+
nick: null;
|
|
19
|
+
mute: boolean;
|
|
20
|
+
joined_at: string;
|
|
21
|
+
guild_id: string;
|
|
22
|
+
flags: number;
|
|
23
|
+
deaf: boolean;
|
|
24
|
+
communication_disabled_until: null;
|
|
25
|
+
avatar: null;
|
|
26
|
+
};
|
|
27
27
|
|
|
28
|
-
export type { GUILD_MEMBER_ADD_TYPE }
|
|
28
|
+
export type { GUILD_MEMBER_ADD_TYPE };
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type GUILD_MEMBER_REMOVE_TYPE = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
6
|
+
user: {
|
|
7
|
+
username: string;
|
|
8
|
+
public_flags: number;
|
|
9
|
+
id: string;
|
|
10
|
+
global_name: string;
|
|
11
|
+
discriminator: string;
|
|
12
|
+
avatar_decoration_data: null;
|
|
13
|
+
avatar: string;
|
|
14
|
+
};
|
|
15
|
+
guild_id: string;
|
|
16
|
+
};
|
|
17
17
|
|
|
18
|
-
export type { GUILD_MEMBER_REMOVE_TYPE }
|
|
18
|
+
export type { GUILD_MEMBER_REMOVE_TYPE };
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type GUILD_MEMBER_UPDATE_TYPE = {
|
|
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
|
-
}
|
|
6
|
+
user: {
|
|
7
|
+
username: string;
|
|
8
|
+
public_flags: number;
|
|
9
|
+
id: string;
|
|
10
|
+
global_name: string;
|
|
11
|
+
display_name: string;
|
|
12
|
+
discriminator: string;
|
|
13
|
+
bot: boolean;
|
|
14
|
+
avatar_decoration_data: {
|
|
15
|
+
sku_id: string;
|
|
16
|
+
asset: string;
|
|
17
|
+
};
|
|
18
|
+
avatar: string;
|
|
19
|
+
};
|
|
20
|
+
roles: string[];
|
|
21
|
+
premium_since: null;
|
|
22
|
+
pending: boolean;
|
|
23
|
+
nick: null;
|
|
24
|
+
mute: boolean;
|
|
25
|
+
joined_at: string;
|
|
26
|
+
guild_id: string;
|
|
27
|
+
flags: number;
|
|
28
|
+
deaf: boolean;
|
|
29
|
+
communication_disabled_until: null;
|
|
30
|
+
avatar: null;
|
|
31
|
+
};
|
|
32
32
|
|
|
33
|
-
export type { GUILD_MEMBER_UPDATE_TYPE }
|
|
33
|
+
export type { GUILD_MEMBER_UPDATE_TYPE };
|
|
@@ -3,57 +3,57 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type MESSAGE_CREATE_TYPE = {
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
6
|
+
type: number;
|
|
7
|
+
tts: boolean;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
referenced_message: null;
|
|
10
|
+
pinned: boolean;
|
|
11
|
+
nonce: string;
|
|
12
|
+
mentions: {
|
|
13
|
+
username: string;
|
|
14
|
+
public_flags: number;
|
|
15
|
+
member: any;
|
|
16
|
+
id: string;
|
|
17
|
+
global_name: null;
|
|
18
|
+
discriminator: string;
|
|
19
|
+
bot: boolean;
|
|
20
|
+
avatar_decoration_data: null;
|
|
21
|
+
avatar: string;
|
|
22
|
+
}[];
|
|
23
|
+
mention_roles: any[];
|
|
24
|
+
mention_everyone: boolean;
|
|
25
|
+
member: {
|
|
26
|
+
roles: any[];
|
|
27
|
+
premium_since: null;
|
|
28
|
+
pending: boolean;
|
|
29
|
+
nick: null;
|
|
30
|
+
mute: boolean;
|
|
31
|
+
joined_at: string;
|
|
32
|
+
flags: number;
|
|
33
|
+
deaf: boolean;
|
|
34
|
+
communication_disabled_until: null;
|
|
35
|
+
avatar: null;
|
|
36
|
+
};
|
|
37
|
+
id: string;
|
|
38
|
+
flags: number;
|
|
39
|
+
embeds: any[];
|
|
40
|
+
edited_timestamp: null;
|
|
41
|
+
content: string;
|
|
42
|
+
components: any[];
|
|
43
|
+
channel_id: string;
|
|
44
|
+
author: {
|
|
45
|
+
username: string;
|
|
46
|
+
public_flags: number;
|
|
47
|
+
premium_type: number;
|
|
48
|
+
id: string;
|
|
49
|
+
global_name: string;
|
|
50
|
+
discriminator: string;
|
|
51
|
+
avatar_decoration_data: null;
|
|
52
|
+
avatar: string;
|
|
53
|
+
bot?: boolean;
|
|
54
|
+
};
|
|
55
|
+
attachments: any[];
|
|
56
|
+
guild_id: string;
|
|
57
|
+
};
|
|
58
58
|
|
|
59
|
-
export type { MESSAGE_CREATE_TYPE }
|
|
59
|
+
export type { MESSAGE_CREATE_TYPE };
|
|
@@ -3,40 +3,40 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type MESSAGE_REACTION_ADD_TYPE = {
|
|
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
|
-
}
|
|
6
|
+
user_id: string;
|
|
7
|
+
type: number;
|
|
8
|
+
message_id: string;
|
|
9
|
+
message_author_id: string;
|
|
10
|
+
member: {
|
|
11
|
+
user: {
|
|
12
|
+
username: string;
|
|
13
|
+
public_flags: number;
|
|
14
|
+
id: string;
|
|
15
|
+
global_name: string;
|
|
16
|
+
display_name: string;
|
|
17
|
+
discriminator: string;
|
|
18
|
+
bot: boolean;
|
|
19
|
+
avatar_decoration_data: null;
|
|
20
|
+
avatar: string;
|
|
21
|
+
};
|
|
22
|
+
roles: string[];
|
|
23
|
+
premium_since: null;
|
|
24
|
+
pending: boolean;
|
|
25
|
+
nick: null;
|
|
26
|
+
mute: boolean;
|
|
27
|
+
joined_at: string;
|
|
28
|
+
flags: number;
|
|
29
|
+
deaf: boolean;
|
|
30
|
+
communication_disabled_until: null;
|
|
31
|
+
avatar: null;
|
|
32
|
+
};
|
|
33
|
+
emoji: {
|
|
34
|
+
name: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
channel_id: string;
|
|
38
|
+
burst: boolean;
|
|
39
|
+
guild_id: string;
|
|
40
|
+
};
|
|
41
41
|
|
|
42
|
-
export type { MESSAGE_REACTION_ADD_TYPE }
|
|
42
|
+
export type { MESSAGE_REACTION_ADD_TYPE };
|
|
@@ -3,54 +3,54 @@
|
|
|
3
3
|
* @param event
|
|
4
4
|
*/
|
|
5
5
|
type MESSAGE_UPDATE_TYPE = {
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
6
|
+
type: number;
|
|
7
|
+
tts: boolean;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
pinned: boolean;
|
|
10
|
+
mentions: any[];
|
|
11
|
+
mention_roles: string[];
|
|
12
|
+
mention_everyone: boolean;
|
|
13
|
+
member: {
|
|
14
|
+
roles: string[];
|
|
15
|
+
premium_since: null;
|
|
16
|
+
pending: boolean;
|
|
17
|
+
nick: null;
|
|
18
|
+
mute: boolean;
|
|
19
|
+
joined_at: string;
|
|
20
|
+
flags: number;
|
|
21
|
+
deaf: boolean;
|
|
22
|
+
communication_disabled_until: null;
|
|
23
|
+
avatar: null;
|
|
24
|
+
};
|
|
25
|
+
id: string;
|
|
26
|
+
flags: number;
|
|
27
|
+
embeds: {
|
|
28
|
+
type: string;
|
|
29
|
+
title: string;
|
|
30
|
+
image: any;
|
|
31
|
+
description: '';
|
|
32
|
+
color: number;
|
|
33
|
+
}[];
|
|
34
|
+
edited_timestamp: string;
|
|
35
|
+
content: string;
|
|
36
|
+
components: {
|
|
37
|
+
type: number;
|
|
38
|
+
components: any;
|
|
39
|
+
}[];
|
|
40
|
+
channel_id: string;
|
|
41
|
+
author: {
|
|
42
|
+
username: string;
|
|
43
|
+
public_flags: number;
|
|
44
|
+
premium_type: number;
|
|
45
|
+
id: string;
|
|
46
|
+
global_name: null;
|
|
47
|
+
discriminator: string;
|
|
48
|
+
bot: true;
|
|
49
|
+
avatar_decoration_data: null;
|
|
50
|
+
avatar: string;
|
|
51
|
+
};
|
|
52
|
+
attachments: any[];
|
|
53
|
+
guild_id: string;
|
|
54
|
+
};
|
|
55
55
|
|
|
56
|
-
export type { MESSAGE_UPDATE_TYPE }
|
|
56
|
+
export type { MESSAGE_UPDATE_TYPE };
|