@alemonjs/discord 2.1.0-alpha.3 → 2.1.0-alpha.4

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.
@@ -1,11 +0,0 @@
1
- /**
2
- * 子频道
3
- * @param event
4
- */
5
- type CHANNEL_TOPIC_UPDATE_TYPE = {
6
- topic: null
7
- id: string
8
- guild_id: string
9
- }
10
-
11
- export type { CHANNEL_TOPIC_UPDATE_TYPE }
@@ -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,11 +0,0 @@
1
- /**
2
- * 消息撤回
3
- * @param event
4
- */
5
- type MESSAGE_DELETE_TYPE = {
6
- id: string
7
- channel_id: string
8
- guild_id: string
9
- }
10
-
11
- export type { MESSAGE_DELETE_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,9 +0,0 @@
1
- type READY_TYPE = {
2
- user: {
3
- id: any
4
- avatar: string
5
- username: string
6
- }
7
- }
8
-
9
- export type { READY_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 }
@@ -1,10 +0,0 @@
1
- /**
2
- * 音频子频道状态更新
3
- */
4
- type VOICE_CHANNEL_STATUS_UPDATE_TYPE = {
5
- status: null
6
- id: string
7
- guild_id: string
8
- }
9
-
10
- export type { VOICE_CHANNEL_STATUS_UPDATE_TYPE }
@@ -1,41 +0,0 @@
1
- /**
2
- * 音频状态更新
3
- */
4
- type VOICE_STATE_UPDATE_TYPE = {
5
- member: {
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: any
15
- avatar: string
16
- }
17
- roles: string[]
18
- premium_since: null
19
- pending: boolean
20
- nick: null
21
- mute: boolean
22
- joined_at: string
23
- flags: number
24
- deaf: boolean
25
- communication_disabled_until: null
26
- avatar: string
27
- }
28
- user_id: string
29
- suppress: boolean
30
- session_id: string
31
- self_video: boolean
32
- self_mute: true
33
- self_deaf: boolean
34
- request_to_speak_timestamp: null
35
- mute: boolean
36
- guild_id: string
37
- deaf: boolean
38
- channel_id: string
39
- }
40
-
41
- export type { VOICE_STATE_UPDATE_TYPE }
@@ -1,101 +0,0 @@
1
- import { CHANNEL_TOPIC_UPDATE_TYPE } from './message/CHANNEL_TOPIC_UPDATE.js'
2
- import { CHANNEL_UPDATE_TYPE } from './message/CHANNEL_UPDATE.js'
3
- import { GUILD_MEMBER_ADD_TYPE } from './message/GUILD_MEMBER_ADD.js'
4
- import { GUILD_MEMBER_REMOVE_TYPE } from './message/GUILD_MEMBER_REMOVE.js'
5
- import { GUILD_MEMBER_UPDATE_TYPE } from './message/GUILD_MEMBER_UPDATE.js'
6
- import { INTERACTION_CREATE_TYPE } from './message/INTERACTION_CREATE.js'
7
- import { MESSAGE_CREATE_TYPE } from './message/MESSAGE_CREATE.js'
8
- import { MESSAGE_DELETE_TYPE } from './message/MESSAGE_DELETE.js'
9
- import { MESSAGE_REACTION_ADD_TYPE } from './message/MESSAGE_REACTION_ADD.js'
10
- import { MESSAGE_UPDATE_TYPE } from './message/MESSAGE_UPDATE.js'
11
- import { PRESENCE_UPDATE_TYPE } from './message/PRESENCE_UPDATE.js'
12
- import { READY_TYPE } from './message/READY.js'
13
- import { TYPING_START_TYPE } from './message/TYPING_START.js'
14
- import { VOICE_CHANNEL_STATUS_UPDATE_TYPE } from './message/VOICE_CHANNEL_STATUS_UPDATE.js'
15
- import { VOICE_STATE_UPDATE_TYPE } from './message/VOICE_STATE_UPDATE.js'
16
-
17
- /**
18
- * Discord 事件映射表
19
- */
20
- type DCEventMap = {
21
- GUILD_CREATE: any
22
- GUILD_UPDATE: any
23
- GUILD_DELETE: any
24
- GUILD_ROLE_CREATE: any
25
- GUILD_ROLE_UPDATE: any
26
- GUILD_ROLE_DELETE: any
27
- CHANNEL_CREATE: any
28
- CHANNEL_UPDATE: CHANNEL_UPDATE_TYPE
29
- CHANNEL_DELETE: any
30
- CHANNEL_PINS_UPDATE: any
31
- CHANNEL_TOPIC_UPDATE: CHANNEL_TOPIC_UPDATE_TYPE
32
- THREAD_CREATE: any
33
- THREAD_UPDATE: any
34
- THREAD_DELETE: any
35
- THREAD_LIST_SYNC: any
36
- THREAD_MEMBER_UPDATE: any
37
- THREAD_MEMBERS_UPDATE: any
38
- STAGE_INSTANCE_CREATE: any
39
- STAGE_INSTANCE_UPDATE: any
40
- STAGE_INSTANCE_DELETE: any
41
- GUILD_MEMBER_ADD: GUILD_MEMBER_ADD_TYPE
42
- GUILD_MEMBER_UPDATE: GUILD_MEMBER_UPDATE_TYPE
43
- GUILD_MEMBER_REMOVE: GUILD_MEMBER_REMOVE_TYPE
44
- GUILD_AUDIT_LOG_ENTRY_CREATE: any
45
- GUILD_BAN_ADD: any
46
- GUILD_BAN_REMOVE: any
47
- GUILD_EMOJIS_UPDATE: any
48
- GUILD_STICKERS_UPDATE: any
49
- GUILD_SOUNDBOARD_SOUND_CREATE: any
50
- GUILD_SOUNDBOARD_SOUND_UPDATE: any
51
- GUILD_SOUNDBOARD_SOUND_DELETE: any
52
- GUILD_SOUNDBOARD_SOUNDS_UPDATE: any
53
- GUILD_INTEGRATIONS_UPDATE: any
54
- INTEGRATION_CREATE: any
55
- INTEGRATION_UPDATE: any
56
- INTEGRATION_DELETE: any
57
- WEBHOOKS_UPDATE: any
58
- INVITE_CREATE: any
59
- INVITE_DELETE: any
60
- VOICE_STATE_UPDATE: VOICE_STATE_UPDATE_TYPE
61
- VOICE_CHANNEL_STATUS_UPDATE: VOICE_CHANNEL_STATUS_UPDATE_TYPE
62
- VOICE_CHANNEL_EFFECT_SEND: any
63
- PRESENCE_UPDATE: PRESENCE_UPDATE_TYPE
64
- MESSAGE_CREATE: MESSAGE_CREATE_TYPE
65
- MESSAGE_UPDATE: MESSAGE_UPDATE_TYPE
66
- MESSAGE_DELETE: MESSAGE_DELETE_TYPE
67
- MESSAGE_DELETE_BULK: any
68
- MESSAGE_REACTION_ADD: MESSAGE_REACTION_ADD_TYPE
69
- MESSAGE_REACTION_REMOVE: any
70
- MESSAGE_REACTION_REMOVE_ALL: any
71
- MESSAGE_REACTION_REMOVE_EMOJI: any
72
- TYPING_START: TYPING_START_TYPE
73
- DIRECT_MESSAGE_CREATE: any
74
- DIRECT_MESSAGE_UPDATE: any
75
- DIRECT_MESSAGE_DELETE: any
76
- DIRECT_MESSAGE_PINS_UPDATE: any
77
- DIRECT_MESSAGE_REACTION_ADD: any
78
- DIRECT_MESSAGE_REACTION_REMOVE: any
79
- DIRECT_MESSAGE_REACTION_REMOVE_ALL: any
80
- DIRECT_MESSAGE_REACTION_REMOVE_EMOJI: any
81
- DIRECT_MESSAGE_TYPING_START: any
82
- GUILD_SCHEDULED_EVENT_CREATE: any
83
- GUILD_SCHEDULED_EVENT_UPDATE: any
84
- GUILD_SCHEDULED_EVENT_DELETE: any
85
- GUILD_SCHEDULED_EVENT_USER_ADD: any
86
- GUILD_SCHEDULED_EVENT_USER_REMOVE: any
87
- AUTO_MODERATION_RULE_CREATE: any
88
- AUTO_MODERATION_RULE_UPDATE: any
89
- AUTO_MODERATION_RULE_DELETE: any
90
- AUTO_MODERATION_ACTION_EXECUTION: any
91
- MESSAGE_POLL_VOTE_ADD: any
92
- MESSAGE_POLL_VOTE_REMOVE: any
93
- DIRECT_MESSAGE_POLL_VOTE_ADD: any
94
- DIRECT_MESSAGE_POLL_VOTE_REMOVE: any
95
- READY: READY_TYPE
96
- ERROR: any
97
- INTERACTION_CREATE: INTERACTION_CREATE_TYPE
98
- RESUMED: any
99
- }
100
-
101
- export type { DCEventMap }