@alemonjs/discord 2.1.0-alpha.5 → 2.1.0-alpha.8
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 +6 -2
- package/lib/config.d.ts +3 -0
- package/lib/config.js +22 -0
- package/lib/index.d.ts +4 -2
- package/lib/index.js +25 -40
- package/lib/sdk/api.d.ts +879 -965
- package/lib/sdk/api.js +61 -35
- package/lib/sdk/typings.d.ts +221 -0
- package/lib/sdk/wss.js +9 -37
- package/lib/send.js +87 -82
- package/package.json +1 -1
- package/dist/assets/index.css +0 -1248
- package/dist/assets/index.js +0 -11015
- package/dist/index.html +0 -15
- package/lib/sdk/config.js +0 -10
- package/lib/sdk/core/config.js +0 -46
- package/lib/sdk/core/from.js +0 -42
- package/lib/sdk/message/CHANNEL_TOPIC_UPDATE.d.ts +0 -11
- package/lib/sdk/message/CHANNEL_UPDATE.d.ts +0 -48
- package/lib/sdk/message/GUILD_MEMBER_ADD.d.ts +0 -28
- package/lib/sdk/message/GUILD_MEMBER_REMOVE.d.ts +0 -18
- package/lib/sdk/message/GUILD_MEMBER_UPDATE.d.ts +0 -33
- package/lib/sdk/message/INTERACTION_CREATE.d.ts +0 -126
- package/lib/sdk/message/MESSAGE_CREATE.d.ts +0 -59
- package/lib/sdk/message/MESSAGE_DELETE.d.ts +0 -11
- package/lib/sdk/message/MESSAGE_REACTION_ADD.d.ts +0 -42
- package/lib/sdk/message/MESSAGE_UPDATE.d.ts +0 -56
- package/lib/sdk/message/PRESENCE_UPDATE.d.ts +0 -69
- package/lib/sdk/message/READY.d.ts +0 -9
- package/lib/sdk/message/TYPING_START.d.ts +0 -35
- package/lib/sdk/message/VOICE_CHANNEL_STATUS_UPDATE.d.ts +0 -10
- package/lib/sdk/message/VOICE_STATE_UPDATE.d.ts +0 -41
- package/lib/sdk/message.d.ts +0 -101
- package/lib/sdk/types.d.ts +0 -5
- package/lib/sdk/types.js +0 -25
- package/lib/sdk/wss.d.ts +0 -27
- package/lib/sdk/wss.types.d.ts +0 -30
package/dist/index.html
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" id="__gui">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>AlemonJS</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index.js"></script>
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index.css" />
|
|
10
|
-
</head>
|
|
11
|
-
|
|
12
|
-
<body>
|
|
13
|
-
<div id="root"></div>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
package/lib/sdk/config.js
DELETED
package/lib/sdk/core/config.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 基础配置结构
|
|
3
|
-
*/
|
|
4
|
-
class BaseConfig {
|
|
5
|
-
#data = null;
|
|
6
|
-
constructor(val) {
|
|
7
|
-
this.#data = val;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* 设置配置
|
|
11
|
-
* @param key
|
|
12
|
-
* @param val
|
|
13
|
-
*/
|
|
14
|
-
set(key, val) {
|
|
15
|
-
if (val !== undefined)
|
|
16
|
-
this.#data[key] = val;
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param key
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
has(key) {
|
|
25
|
-
if (Object.prototype.hasOwnProperty.call(this.#data, key)) ;
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* 读取配置
|
|
30
|
-
* @param key
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
all() {
|
|
34
|
-
return this.#data;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 读取配置
|
|
38
|
-
* @param key
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
get(key) {
|
|
42
|
-
return this.#data[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { BaseConfig };
|
package/lib/sdk/core/from.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { existsSync, createReadStream } from 'fs';
|
|
2
|
-
import { Readable, isReadable } from 'stream';
|
|
3
|
-
import { basename } from 'path';
|
|
4
|
-
import { fileTypeFromBuffer, fileTypeFromStream } from 'file-type';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 创建form
|
|
8
|
-
* @param image
|
|
9
|
-
* @param name
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
async function createPicFrom(image, name = 'image.jpg') {
|
|
13
|
-
let picData;
|
|
14
|
-
// 是 string
|
|
15
|
-
if (typeof image === 'string') {
|
|
16
|
-
if (!existsSync(image))
|
|
17
|
-
return false;
|
|
18
|
-
if (!name)
|
|
19
|
-
name = basename(image);
|
|
20
|
-
picData = createReadStream(image);
|
|
21
|
-
// 是 buffer
|
|
22
|
-
}
|
|
23
|
-
else if (Buffer.isBuffer(image)) {
|
|
24
|
-
if (!name)
|
|
25
|
-
name = 'file.' + (await fileTypeFromBuffer(image)).ext;
|
|
26
|
-
picData = new Readable();
|
|
27
|
-
picData.push(image);
|
|
28
|
-
picData.push(null);
|
|
29
|
-
// 是 文件流
|
|
30
|
-
}
|
|
31
|
-
else if (isReadable(image)) {
|
|
32
|
-
if (!name)
|
|
33
|
-
name = 'file.' + (await fileTypeFromStream(image)).ext;
|
|
34
|
-
picData = image;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return { picData, image, name };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { createPicFrom };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 子频道更新
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type CHANNEL_UPDATE_TYPE = {
|
|
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
|
-
|
|
48
|
-
export type { CHANNEL_UPDATE_TYPE }
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 频道 成员 增加
|
|
3
|
-
*/
|
|
4
|
-
type GUILD_MEMBER_ADD_TYPE = {
|
|
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
|
-
|
|
28
|
-
export type { GUILD_MEMBER_ADD_TYPE }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 频道成员删除
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type GUILD_MEMBER_REMOVE_TYPE = {
|
|
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
|
-
|
|
18
|
-
export type { GUILD_MEMBER_REMOVE_TYPE }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 频道成员更新
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type GUILD_MEMBER_UPDATE_TYPE = {
|
|
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
|
-
|
|
33
|
-
export type { GUILD_MEMBER_UPDATE_TYPE }
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
interface User {
|
|
2
|
-
username: string
|
|
3
|
-
public_flags: number
|
|
4
|
-
primary_guild: null
|
|
5
|
-
id: string
|
|
6
|
-
global_name: string | null
|
|
7
|
-
discriminator: string
|
|
8
|
-
collectibles: null
|
|
9
|
-
clan: null
|
|
10
|
-
avatar_decoration_data: null
|
|
11
|
-
avatar: string
|
|
12
|
-
}
|
|
13
|
-
type Message = {
|
|
14
|
-
type: number
|
|
15
|
-
tts: boolean
|
|
16
|
-
timestamp: string
|
|
17
|
-
pinned: boolean
|
|
18
|
-
mentions: unknown[]
|
|
19
|
-
mention_roles: unknown[]
|
|
20
|
-
mention_everyone: boolean
|
|
21
|
-
id: string
|
|
22
|
-
flags: number
|
|
23
|
-
embeds: unknown[]
|
|
24
|
-
edited_timestamp: string | null
|
|
25
|
-
content: string
|
|
26
|
-
components: unknown[]
|
|
27
|
-
channel_id: string
|
|
28
|
-
author: User
|
|
29
|
-
attachments: unknown[]
|
|
30
|
-
}
|
|
31
|
-
type Member = {
|
|
32
|
-
user: User
|
|
33
|
-
unusual_dm_activity_until: string | null
|
|
34
|
-
roles: string[]
|
|
35
|
-
premium_since: string | null
|
|
36
|
-
permissions: string
|
|
37
|
-
pending: boolean
|
|
38
|
-
nick: string | null
|
|
39
|
-
mute: boolean
|
|
40
|
-
joined_at: string
|
|
41
|
-
flags: number
|
|
42
|
-
deaf: boolean
|
|
43
|
-
communication_disabled_until: string | null
|
|
44
|
-
banner: string | null
|
|
45
|
-
avatar: string | null
|
|
46
|
-
}
|
|
47
|
-
type DiscordGuild = {
|
|
48
|
-
locale: string
|
|
49
|
-
id: string
|
|
50
|
-
features: string[]
|
|
51
|
-
}
|
|
52
|
-
type PublicChannel = {
|
|
53
|
-
type: number
|
|
54
|
-
topic: string | null
|
|
55
|
-
theme_color: number | null
|
|
56
|
-
rate_limit_per_user: number
|
|
57
|
-
position: number
|
|
58
|
-
permissions: string
|
|
59
|
-
parent_id: string
|
|
60
|
-
nsfw: boolean
|
|
61
|
-
name: string
|
|
62
|
-
last_message_id: string
|
|
63
|
-
id: string
|
|
64
|
-
icon_emoji: {
|
|
65
|
-
name: string
|
|
66
|
-
id: string | null
|
|
67
|
-
}
|
|
68
|
-
guild_id: string
|
|
69
|
-
flags: number
|
|
70
|
-
}
|
|
71
|
-
interface Channel {
|
|
72
|
-
type: number
|
|
73
|
-
recipients: any[]
|
|
74
|
-
recipient_flags: number
|
|
75
|
-
last_message_id: string
|
|
76
|
-
id: string
|
|
77
|
-
flags: number
|
|
78
|
-
}
|
|
79
|
-
interface Data {
|
|
80
|
-
id: number
|
|
81
|
-
custom_id: string
|
|
82
|
-
component_type: number
|
|
83
|
-
}
|
|
84
|
-
type Public = {
|
|
85
|
-
version: number
|
|
86
|
-
type: number
|
|
87
|
-
token: string
|
|
88
|
-
member: Member
|
|
89
|
-
message: Message
|
|
90
|
-
locale: string
|
|
91
|
-
id: string
|
|
92
|
-
guild_locale: string
|
|
93
|
-
guild_id: string
|
|
94
|
-
guild: DiscordGuild
|
|
95
|
-
entitlement_sku_ids: any[]
|
|
96
|
-
entitlements: any[]
|
|
97
|
-
data: Data
|
|
98
|
-
context: number
|
|
99
|
-
channel_id: string
|
|
100
|
-
channel: PublicChannel
|
|
101
|
-
authorizing_integration_owners: Record<string, string>
|
|
102
|
-
attachment_size_limit: number
|
|
103
|
-
application_id: string
|
|
104
|
-
app_permissions: string
|
|
105
|
-
}
|
|
106
|
-
type Private = {
|
|
107
|
-
version: number
|
|
108
|
-
type: number
|
|
109
|
-
token: string
|
|
110
|
-
user: User
|
|
111
|
-
message: Message
|
|
112
|
-
locale: string
|
|
113
|
-
id: string
|
|
114
|
-
entitlements: any[]
|
|
115
|
-
data: Data
|
|
116
|
-
context: number
|
|
117
|
-
channel_id: string
|
|
118
|
-
channel: Channel
|
|
119
|
-
authorizing_integration_owners: Record<string, string>
|
|
120
|
-
attachment_size_limit: number
|
|
121
|
-
application_id: string
|
|
122
|
-
app_permissions: string
|
|
123
|
-
}
|
|
124
|
-
type INTERACTION_CREATE_TYPE = Public | Private
|
|
125
|
-
|
|
126
|
-
export type { INTERACTION_CREATE_TYPE }
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 基础消息
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type MESSAGE_CREATE_TYPE = {
|
|
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
|
-
|
|
59
|
-
export type { MESSAGE_CREATE_TYPE }
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表情增加
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type MESSAGE_REACTION_ADD_TYPE = {
|
|
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
|
-
|
|
42
|
-
export type { MESSAGE_REACTION_ADD_TYPE }
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 消息更新
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type MESSAGE_UPDATE_TYPE = {
|
|
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
|
-
|
|
56
|
-
export type { MESSAGE_UPDATE_TYPE }
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表态 更新
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type PRESENCE_UPDATE_TYPE = {
|
|
6
|
-
user:
|
|
7
|
-
| {
|
|
8
|
-
id: number
|
|
9
|
-
}
|
|
10
|
-
| {
|
|
11
|
-
username: string
|
|
12
|
-
public_flags: number
|
|
13
|
-
id: string
|
|
14
|
-
global_name: string
|
|
15
|
-
discriminator: string
|
|
16
|
-
avatar_decoration_data: {
|
|
17
|
-
sku_id: string
|
|
18
|
-
asset: string
|
|
19
|
-
}
|
|
20
|
-
avatar: string
|
|
21
|
-
}
|
|
22
|
-
status: string
|
|
23
|
-
guild_id: string
|
|
24
|
-
client_status: {
|
|
25
|
-
desktop: string
|
|
26
|
-
}
|
|
27
|
-
broadcast: null
|
|
28
|
-
activities:
|
|
29
|
-
| {
|
|
30
|
-
type: number
|
|
31
|
-
timestamps: any
|
|
32
|
-
state: string
|
|
33
|
-
name: string
|
|
34
|
-
id: string
|
|
35
|
-
details: string
|
|
36
|
-
created_at: number
|
|
37
|
-
assets: any
|
|
38
|
-
application_id: string
|
|
39
|
-
}[]
|
|
40
|
-
| {
|
|
41
|
-
type: number
|
|
42
|
-
state: string
|
|
43
|
-
name: string
|
|
44
|
-
id: string
|
|
45
|
-
emoji: any
|
|
46
|
-
created_at: number
|
|
47
|
-
}[]
|
|
48
|
-
| {
|
|
49
|
-
type: number
|
|
50
|
-
name: string
|
|
51
|
-
id: string
|
|
52
|
-
created_at: number
|
|
53
|
-
}[]
|
|
54
|
-
| {
|
|
55
|
-
type: number
|
|
56
|
-
timestamps: any
|
|
57
|
-
state: string
|
|
58
|
-
session_id: string
|
|
59
|
-
name: string
|
|
60
|
-
id: string
|
|
61
|
-
details: string
|
|
62
|
-
created_at: number
|
|
63
|
-
buttons: any[]
|
|
64
|
-
assets: any
|
|
65
|
-
application_id: string
|
|
66
|
-
}[]
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type { PRESENCE_UPDATE_TYPE }
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 类型开始
|
|
3
|
-
* @param event
|
|
4
|
-
*/
|
|
5
|
-
type TYPING_START_TYPE = {
|
|
6
|
-
user_id: string
|
|
7
|
-
timestamp: number
|
|
8
|
-
member: {
|
|
9
|
-
user: {
|
|
10
|
-
username: string
|
|
11
|
-
public_flags: number
|
|
12
|
-
id: string
|
|
13
|
-
global_name: string
|
|
14
|
-
display_name: string
|
|
15
|
-
discriminator: string
|
|
16
|
-
bot: boolean
|
|
17
|
-
avatar_decoration_data: null
|
|
18
|
-
avatar: string
|
|
19
|
-
}
|
|
20
|
-
roles: string[]
|
|
21
|
-
premium_since: string
|
|
22
|
-
pending: boolean
|
|
23
|
-
nick: string
|
|
24
|
-
mute: boolean
|
|
25
|
-
joined_at: string
|
|
26
|
-
flags: number
|
|
27
|
-
deaf: boolean
|
|
28
|
-
communication_disabled_until: null
|
|
29
|
-
avatar: null
|
|
30
|
-
}
|
|
31
|
-
channel_id: string
|
|
32
|
-
guild_id: string
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type { TYPING_START_TYPE }
|