disgroove 3.0.1-dev.739a5a9 → 3.0.1-dev.a547862
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/LICENSE +1 -1
- package/README.md +38 -8
- package/dist/lib/Client.d.ts +78 -4
- package/dist/lib/Client.js +110 -1
- package/dist/lib/constants.d.ts +78 -5
- package/dist/lib/constants.js +84 -2
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +25 -0
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +7 -0
- package/dist/lib/rest/Endpoints.d.ts +7 -1
- package/dist/lib/rest/Endpoints.js +15 -3
- package/dist/lib/rest/RequestManager.d.ts +1 -0
- package/dist/lib/rest/RequestManager.js +2 -3
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Components.d.ts +7 -1
- package/dist/lib/transformers/Components.js +80 -0
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Interactions.js +46 -0
- package/dist/lib/transformers/Invites.d.ts +3 -0
- package/dist/lib/transformers/Invites.js +32 -0
- package/dist/lib/transformers/Lobbies.d.ts +3 -1
- package/dist/lib/transformers/Lobbies.js +29 -0
- package/dist/lib/transformers/Messages.d.ts +1 -1
- package/dist/lib/transformers/Messages.js +78 -20
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +16 -10
- package/dist/lib/types/application.d.ts +4 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/components.d.ts +133 -7
- package/dist/lib/types/gateway-events.d.ts +64 -2
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/invite.d.ts +2 -2
- package/dist/lib/types/lobby.d.ts +36 -1
- package/dist/lib/types/message.d.ts +66 -1
- package/dist/package.json +4 -3
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivityFlags, ActivityType, AnimationTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
|
1
|
+
import type { ActivityFlags, ActivityType, AnimationTypes, ChannelTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
|
2
2
|
import type { RawApplication, Application } from "./application";
|
|
3
3
|
import type { RawAutoModerationAction, AutoModerationAction } from "./auto-moderation";
|
|
4
4
|
import type { RawChannel, RawThreadMember, Channel, ThreadMember } from "./channel";
|
|
@@ -10,7 +10,7 @@ import { RawRole, Role } from "./role";
|
|
|
10
10
|
import type { RawSoundboardSound, SoundboardSound } from "./soundboard";
|
|
11
11
|
import type { RawStageInstance, StageInstance } from "./stage-instance";
|
|
12
12
|
import { RawSticker, Sticker } from "./sticker";
|
|
13
|
-
import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData } from "./user";
|
|
13
|
+
import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData, Collectibles, RawCollectibles } from "./user";
|
|
14
14
|
import type { RawVoiceState, VoiceState } from "./voice";
|
|
15
15
|
/** https://discord.com/developers/docs/events/gateway-events#payload-structure */
|
|
16
16
|
export interface RawPayload {
|
|
@@ -54,6 +54,11 @@ export interface RawRequestGuildMembers {
|
|
|
54
54
|
export interface RawRequestSoundboardSounds {
|
|
55
55
|
guild_ids: Array<snowflake>;
|
|
56
56
|
}
|
|
57
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
58
|
+
export interface RawRequestChannelInfo {
|
|
59
|
+
guild_id: snowflake;
|
|
60
|
+
fields: Array<string>;
|
|
61
|
+
}
|
|
57
62
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
58
63
|
export interface RawGatewayPresenceUpdate {
|
|
59
64
|
since: number | null;
|
|
@@ -92,6 +97,29 @@ export interface RawAutoModerationActionExecutionEvent {
|
|
|
92
97
|
matched_keyword: string | null;
|
|
93
98
|
matched_content: string | null;
|
|
94
99
|
}
|
|
100
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
101
|
+
export interface RawChannelInfoEvent {
|
|
102
|
+
guild_id: snowflake;
|
|
103
|
+
channels: Array<RawChannelInfoChannel>;
|
|
104
|
+
}
|
|
105
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
106
|
+
export interface RawChannelInfoChannel {
|
|
107
|
+
id: snowflake;
|
|
108
|
+
status?: string | null;
|
|
109
|
+
voice_start_time?: number | null;
|
|
110
|
+
}
|
|
111
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
112
|
+
export interface RawVoiceChannelStatusUpdateEvent {
|
|
113
|
+
id: snowflake;
|
|
114
|
+
guild_id: snowflake;
|
|
115
|
+
status: string | null;
|
|
116
|
+
}
|
|
117
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
118
|
+
export interface RawVoiceChannelStartTimeUpdateEvent {
|
|
119
|
+
id: snowflake;
|
|
120
|
+
guild_id: snowflake;
|
|
121
|
+
voice_start_time?: number | null;
|
|
122
|
+
}
|
|
95
123
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
96
124
|
export interface RawThreadListSyncEvent {
|
|
97
125
|
guild_id: snowflake;
|
|
@@ -185,6 +213,7 @@ export interface RawGuildMemberUpdateEvent {
|
|
|
185
213
|
communication_disabled_until?: number | null;
|
|
186
214
|
flags?: GuildMemberFlags;
|
|
187
215
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
216
|
+
collectibles?: RawCollectibles | null;
|
|
188
217
|
}
|
|
189
218
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
190
219
|
export interface RawGuildMembersChunkEvent {
|
|
@@ -267,6 +296,7 @@ export interface RawInviteCreateEvent {
|
|
|
267
296
|
temporary: boolean;
|
|
268
297
|
uses: number;
|
|
269
298
|
expires_at: timestamp | null;
|
|
299
|
+
roles_ids?: Array<snowflake>;
|
|
270
300
|
}
|
|
271
301
|
/** https://discord.com/developers/docs/events/gateway-events#invite-delete-invite-delete-event-fields */
|
|
272
302
|
export interface RawInviteDeleteEvent {
|
|
@@ -279,6 +309,7 @@ export interface RawMessageCreateEventExtra {
|
|
|
279
309
|
guild_id?: snowflake;
|
|
280
310
|
member?: RawGuildMember;
|
|
281
311
|
mentions: Array<RawUser>;
|
|
312
|
+
channel_type?: ChannelTypes;
|
|
282
313
|
}
|
|
283
314
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
284
315
|
export interface RawMessageDeleteEvent {
|
|
@@ -493,6 +524,11 @@ export interface RequestGuildMembers {
|
|
|
493
524
|
export interface RequestSoundboardSounds {
|
|
494
525
|
guildIds: Array<snowflake>;
|
|
495
526
|
}
|
|
527
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
528
|
+
export interface RequestChannelInfo {
|
|
529
|
+
guildId: snowflake;
|
|
530
|
+
fields: Array<string>;
|
|
531
|
+
}
|
|
496
532
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
497
533
|
export interface GatewayPresenceUpdate {
|
|
498
534
|
since: number | null;
|
|
@@ -531,6 +567,29 @@ export interface AutoModerationActionExecutionEvent {
|
|
|
531
567
|
matchedKeyword: string | null;
|
|
532
568
|
matchedContent: string | null;
|
|
533
569
|
}
|
|
570
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
571
|
+
export interface ChannelInfoEvent {
|
|
572
|
+
guildId: snowflake;
|
|
573
|
+
channels: Array<RawChannelInfoChannel>;
|
|
574
|
+
}
|
|
575
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
576
|
+
export interface ChannelInfoChannel {
|
|
577
|
+
id: snowflake;
|
|
578
|
+
status?: string | null;
|
|
579
|
+
voiceStartTime?: number | null;
|
|
580
|
+
}
|
|
581
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
582
|
+
export interface VoiceChannelStatusUpdateEvent {
|
|
583
|
+
id: snowflake;
|
|
584
|
+
guildId: snowflake;
|
|
585
|
+
status: string | null;
|
|
586
|
+
}
|
|
587
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
588
|
+
export interface VoiceChannelStartTimeUpdateEvent {
|
|
589
|
+
id: snowflake;
|
|
590
|
+
guildId: snowflake;
|
|
591
|
+
voiceStartTime?: number | null;
|
|
592
|
+
}
|
|
534
593
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
535
594
|
export interface ThreadListSyncEvent {
|
|
536
595
|
guildId: snowflake;
|
|
@@ -624,6 +683,7 @@ export interface GuildMemberUpdateEvent {
|
|
|
624
683
|
communicationDisabledUntil?: number | null;
|
|
625
684
|
flags?: GuildMemberFlags;
|
|
626
685
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
686
|
+
collectibles?: Collectibles | null;
|
|
627
687
|
}
|
|
628
688
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
629
689
|
export interface GuildMembersChunkEvent {
|
|
@@ -706,6 +766,7 @@ export interface InviteCreateEvent {
|
|
|
706
766
|
temporary: boolean;
|
|
707
767
|
uses: number;
|
|
708
768
|
expiresAt: timestamp | null;
|
|
769
|
+
roleIds?: Array<snowflake>;
|
|
709
770
|
}
|
|
710
771
|
/** https://discord.com/developers/docs/events/gateway-events#invite-delete-invite-delete-event-fields */
|
|
711
772
|
export interface InviteDeleteEvent {
|
|
@@ -718,6 +779,7 @@ export interface MessageCreateEventExtra {
|
|
|
718
779
|
guildId?: snowflake;
|
|
719
780
|
member?: GuildMember;
|
|
720
781
|
mentions: Array<User>;
|
|
782
|
+
channelType?: ChannelTypes;
|
|
721
783
|
}
|
|
722
784
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
723
785
|
export interface MessageDeleteEvent {
|
|
@@ -4,7 +4,7 @@ import type { snowflake, timestamp } from "./common";
|
|
|
4
4
|
import type { RawEmoji, Emoji } from "./emoji";
|
|
5
5
|
import type { RawRole, Role } from "./role";
|
|
6
6
|
import type { RawSticker, Sticker } from "./sticker";
|
|
7
|
-
import type { AvatarDecorationData, RawAvatarDecorationData, RawUser, User } from "./user";
|
|
7
|
+
import type { AvatarDecorationData, Collectibles, RawAvatarDecorationData, RawCollectibles, RawUser, User } from "./user";
|
|
8
8
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
|
9
9
|
export interface RawGuild {
|
|
10
10
|
id: snowflake;
|
|
@@ -102,6 +102,7 @@ export interface RawGuildMember {
|
|
|
102
102
|
communication_disabled_until?: timestamp | null;
|
|
103
103
|
unusual_dm_activity_until?: timestamp | null;
|
|
104
104
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
105
|
+
collectibles?: RawCollectibles | null;
|
|
105
106
|
}
|
|
106
107
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
|
|
107
108
|
export interface RawIntegration {
|
|
@@ -286,6 +287,7 @@ export interface GuildMember {
|
|
|
286
287
|
communicationDisabledUntil?: timestamp | null;
|
|
287
288
|
unusualDMActivityUntil?: timestamp | null;
|
|
288
289
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
290
|
+
collectibles?: Collectibles | null;
|
|
289
291
|
}
|
|
290
292
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
|
|
291
293
|
export interface Integration {
|
|
@@ -22,7 +22,7 @@ export interface RawInvite {
|
|
|
22
22
|
stage_instance?: RawInviteStageInstance;
|
|
23
23
|
guild_scheduled_event?: RawGuildScheduledEvent;
|
|
24
24
|
flags?: GuildInviteFlags;
|
|
25
|
-
roles?: Array<RawRole
|
|
25
|
+
roles?: Array<Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">>;
|
|
26
26
|
}
|
|
27
27
|
/** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
|
|
28
28
|
export interface RawInviteMetadata {
|
|
@@ -55,7 +55,7 @@ export interface Invite {
|
|
|
55
55
|
stageInstance?: InviteStageInstance;
|
|
56
56
|
guildScheduledEvent?: GuildScheduledEvent;
|
|
57
57
|
flags?: GuildInviteFlags;
|
|
58
|
-
roles?: Array<Role
|
|
58
|
+
roles?: Array<Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">>;
|
|
59
59
|
}
|
|
60
60
|
/** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
|
|
61
61
|
export interface InviteMetadata {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { LobbyMemberFlags } from "../constants";
|
|
1
|
+
import type { LobbyMemberFlags, MessageFlags, MessageTypes } from "../constants";
|
|
2
2
|
import type { RawChannel } from "./channel";
|
|
3
3
|
import type { snowflake } from "./common";
|
|
4
|
+
import { RawUser, User } from "./user";
|
|
4
5
|
/** https://discord.com/developers/docs/resources/lobby#lobby-object */
|
|
5
6
|
export interface RawLobby {
|
|
6
7
|
id: snowflake;
|
|
@@ -15,6 +16,23 @@ export interface RawLobbyMember {
|
|
|
15
16
|
metadata?: Record<string, string> | null;
|
|
16
17
|
flags?: LobbyMemberFlags;
|
|
17
18
|
}
|
|
19
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
20
|
+
export interface RawLobbyMessage {
|
|
21
|
+
id: snowflake;
|
|
22
|
+
type: MessageTypes;
|
|
23
|
+
content: string;
|
|
24
|
+
lobby_id: snowflake;
|
|
25
|
+
channel_id: snowflake;
|
|
26
|
+
author: RawUser;
|
|
27
|
+
metadata?: Record<string, string> | null;
|
|
28
|
+
moderation_metadata?: Record<string, string> | null;
|
|
29
|
+
flags: MessageFlags;
|
|
30
|
+
application_id: snowflake;
|
|
31
|
+
}
|
|
32
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
33
|
+
export interface RawLobbyInvite {
|
|
34
|
+
code: string;
|
|
35
|
+
}
|
|
18
36
|
/** https://discord.com/developers/docs/resources/lobby#lobby-object */
|
|
19
37
|
export interface Lobby {
|
|
20
38
|
id: snowflake;
|
|
@@ -29,3 +47,20 @@ export interface LobbyMember {
|
|
|
29
47
|
metadata?: Record<string, string> | null;
|
|
30
48
|
flags?: LobbyMemberFlags;
|
|
31
49
|
}
|
|
50
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
51
|
+
export interface LobbyMessage {
|
|
52
|
+
id: snowflake;
|
|
53
|
+
type: MessageTypes;
|
|
54
|
+
content: string;
|
|
55
|
+
lobbyId: snowflake;
|
|
56
|
+
channelId: snowflake;
|
|
57
|
+
author: User;
|
|
58
|
+
metadata?: Record<string, string> | null;
|
|
59
|
+
moderationMetadata?: Record<string, string> | null;
|
|
60
|
+
flags: MessageFlags;
|
|
61
|
+
applicationId: snowflake;
|
|
62
|
+
}
|
|
63
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
64
|
+
export interface LobbyInvite {
|
|
65
|
+
code: string;
|
|
66
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
|
|
1
|
+
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes, EmbedFlags, EmbedMediaFlags } from "../constants";
|
|
2
2
|
import type { Application, RawApplication } from "./application";
|
|
3
3
|
import type { Channel, RawChannel } from "./channel";
|
|
4
4
|
import type { snowflake, timestamp } from "./common";
|
|
@@ -46,6 +46,7 @@ export interface RawMessage {
|
|
|
46
46
|
resolved?: RawResolvedData;
|
|
47
47
|
poll?: RawPoll;
|
|
48
48
|
call?: RawMessageCall;
|
|
49
|
+
shared_client_theme?: RawSharedClientTheme;
|
|
49
50
|
}
|
|
50
51
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
51
52
|
export interface RawMessageActivity {
|
|
@@ -108,6 +109,7 @@ export interface RawEmbed {
|
|
|
108
109
|
provider?: RawEmbedProvider;
|
|
109
110
|
author?: RawEmbedAuthor;
|
|
110
111
|
fields?: Array<RawEmbedField>;
|
|
112
|
+
flags?: EmbedFlags;
|
|
111
113
|
}
|
|
112
114
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
113
115
|
export interface RawEmbedThumbnail {
|
|
@@ -122,6 +124,11 @@ export interface RawEmbedVideo {
|
|
|
122
124
|
proxy_url?: string;
|
|
123
125
|
height?: number;
|
|
124
126
|
width?: number;
|
|
127
|
+
content_type?: string;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
placeholder_version?: number;
|
|
130
|
+
description?: string;
|
|
131
|
+
flags?: EmbedMediaFlags;
|
|
125
132
|
}
|
|
126
133
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
127
134
|
export interface RawEmbedImage {
|
|
@@ -129,6 +136,11 @@ export interface RawEmbedImage {
|
|
|
129
136
|
proxy_url?: string;
|
|
130
137
|
height?: number;
|
|
131
138
|
width?: number;
|
|
139
|
+
content_type?: string;
|
|
140
|
+
placeholder?: string;
|
|
141
|
+
placeholder_version?: number;
|
|
142
|
+
description?: string;
|
|
143
|
+
flags?: EmbedMediaFlags;
|
|
132
144
|
}
|
|
133
145
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
134
146
|
export interface RawEmbedProvider {
|
|
@@ -181,6 +193,9 @@ export interface RawAttachment {
|
|
|
181
193
|
duration_secs?: number;
|
|
182
194
|
waveform?: boolean;
|
|
183
195
|
flags?: AttachmentFlags;
|
|
196
|
+
clip_participants?: Array<RawUser>;
|
|
197
|
+
clip_created_at?: timestamp;
|
|
198
|
+
application?: RawApplication | null;
|
|
184
199
|
}
|
|
185
200
|
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
186
201
|
export interface RawChannelMention {
|
|
@@ -208,6 +223,14 @@ export interface RawMessagePin {
|
|
|
208
223
|
pinnet_at: timestamp;
|
|
209
224
|
message: RawMessage;
|
|
210
225
|
}
|
|
226
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
227
|
+
export interface RawSharedClientTheme {
|
|
228
|
+
colors: Array<string>;
|
|
229
|
+
gradient_angle: number;
|
|
230
|
+
base_mix: number;
|
|
231
|
+
base_theme?: BaseThemeTypes | null;
|
|
232
|
+
}
|
|
233
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-structure */
|
|
211
234
|
export interface Message {
|
|
212
235
|
id: snowflake;
|
|
213
236
|
channelId: snowflake;
|
|
@@ -245,11 +268,14 @@ export interface Message {
|
|
|
245
268
|
resolved?: ResolvedData;
|
|
246
269
|
poll?: Poll;
|
|
247
270
|
call?: MessageCall;
|
|
271
|
+
sharedClientTheme?: SharedClientTheme;
|
|
248
272
|
}
|
|
273
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
249
274
|
export interface MessageActivity {
|
|
250
275
|
type: MessageActivityTypes;
|
|
251
276
|
partyId?: string;
|
|
252
277
|
}
|
|
278
|
+
/** https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-interaction-metadata-structure */
|
|
253
279
|
export interface MessageInteractionMetadata {
|
|
254
280
|
id: snowflake;
|
|
255
281
|
type: InteractionType;
|
|
@@ -259,10 +285,12 @@ export interface MessageInteractionMetadata {
|
|
|
259
285
|
interactedMessageId?: snowflake;
|
|
260
286
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
|
261
287
|
}
|
|
288
|
+
/** https://discord.com/developers/docs/resources/message#message-call-object-message-call-object-structure */
|
|
262
289
|
export interface MessageCall {
|
|
263
290
|
partecipants: Array<snowflake>;
|
|
264
291
|
endedTimestamp?: timestamp | null;
|
|
265
292
|
}
|
|
293
|
+
/** https://discord.com/developers/docs/resources/message#message-reference-object-message-reference-structure */
|
|
266
294
|
export interface MessageReference {
|
|
267
295
|
type?: MessageReferenceTypes;
|
|
268
296
|
messageId?: snowflake;
|
|
@@ -270,9 +298,11 @@ export interface MessageReference {
|
|
|
270
298
|
guildId?: snowflake;
|
|
271
299
|
failIfNotExists?: boolean;
|
|
272
300
|
}
|
|
301
|
+
/** https://discord.com/developers/docs/resources/message#message-snapshot-object-message-snapshot-structure */
|
|
273
302
|
export interface MessageSnapshot {
|
|
274
303
|
message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles" | "stickers" | "stickerItems" | "components">;
|
|
275
304
|
}
|
|
305
|
+
/** https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure */
|
|
276
306
|
export interface Reaction {
|
|
277
307
|
count: number;
|
|
278
308
|
countDetails: ReactionCountDetails;
|
|
@@ -281,10 +311,12 @@ export interface Reaction {
|
|
|
281
311
|
emoji: Emoji;
|
|
282
312
|
burstColors: Array<string>;
|
|
283
313
|
}
|
|
314
|
+
/** https://discord.com/developers/docs/resources/message#reaction-count-details-object-reaction-count-details-structure */
|
|
284
315
|
export interface ReactionCountDetails {
|
|
285
316
|
burst: number;
|
|
286
317
|
normal: number;
|
|
287
318
|
}
|
|
319
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
|
|
288
320
|
export interface Embed {
|
|
289
321
|
title?: string;
|
|
290
322
|
type?: EmbedTypes;
|
|
@@ -299,45 +331,64 @@ export interface Embed {
|
|
|
299
331
|
provider?: EmbedProvider;
|
|
300
332
|
author?: EmbedAuthor;
|
|
301
333
|
fields?: Array<EmbedField>;
|
|
334
|
+
flags?: EmbedFlags;
|
|
302
335
|
}
|
|
336
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
303
337
|
export interface EmbedThumbnail {
|
|
304
338
|
url: string;
|
|
305
339
|
proxyURL?: string;
|
|
306
340
|
height?: number;
|
|
307
341
|
width?: number;
|
|
308
342
|
}
|
|
343
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure */
|
|
309
344
|
export interface EmbedVideo {
|
|
310
345
|
url?: string;
|
|
311
346
|
proxyURL?: string;
|
|
312
347
|
height?: number;
|
|
313
348
|
width?: number;
|
|
349
|
+
contentType?: string;
|
|
350
|
+
placeholder?: string;
|
|
351
|
+
placeholderVersion?: number;
|
|
352
|
+
description?: string;
|
|
353
|
+
flags?: EmbedMediaFlags;
|
|
314
354
|
}
|
|
355
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
315
356
|
export interface EmbedImage {
|
|
316
357
|
url: string;
|
|
317
358
|
proxyURL?: string;
|
|
318
359
|
height?: number;
|
|
319
360
|
width?: number;
|
|
361
|
+
contentType?: string;
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
placeholderVersion?: number;
|
|
364
|
+
description?: string;
|
|
365
|
+
flags?: EmbedMediaFlags;
|
|
320
366
|
}
|
|
367
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
321
368
|
export interface EmbedProvider {
|
|
322
369
|
name?: string;
|
|
323
370
|
url?: string;
|
|
324
371
|
}
|
|
372
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure */
|
|
325
373
|
export interface EmbedAuthor {
|
|
326
374
|
name: string;
|
|
327
375
|
url?: string;
|
|
328
376
|
iconURL?: string;
|
|
329
377
|
proxyIconURL?: string;
|
|
330
378
|
}
|
|
379
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure */
|
|
331
380
|
export interface EmbedFooter {
|
|
332
381
|
text: string;
|
|
333
382
|
iconURL?: string;
|
|
334
383
|
proxyIconURL?: string;
|
|
335
384
|
}
|
|
385
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure */
|
|
336
386
|
export interface EmbedField {
|
|
337
387
|
name: string;
|
|
338
388
|
value: string;
|
|
339
389
|
inline?: boolean;
|
|
340
390
|
}
|
|
391
|
+
/** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
|
|
341
392
|
export interface PollResultEmbedFields {
|
|
342
393
|
pollQuestionText: string;
|
|
343
394
|
victorAnswerVotes: Array<number>;
|
|
@@ -348,6 +399,7 @@ export interface PollResultEmbedFields {
|
|
|
348
399
|
victorAnswerEmojiName?: string;
|
|
349
400
|
victorAnswerEmojiAnimated?: boolean;
|
|
350
401
|
}
|
|
402
|
+
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
|
|
351
403
|
export interface Attachment {
|
|
352
404
|
id: snowflake;
|
|
353
405
|
filename: string;
|
|
@@ -363,13 +415,18 @@ export interface Attachment {
|
|
|
363
415
|
durationSecs?: number;
|
|
364
416
|
waveform?: boolean;
|
|
365
417
|
flags?: AttachmentFlags;
|
|
418
|
+
clipParticipants?: Array<User>;
|
|
419
|
+
clipCreatedAt?: timestamp;
|
|
420
|
+
application?: Application | null;
|
|
366
421
|
}
|
|
422
|
+
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
367
423
|
export interface ChannelMention {
|
|
368
424
|
id: snowflake;
|
|
369
425
|
guildId: snowflake;
|
|
370
426
|
type: ChannelTypes;
|
|
371
427
|
name: string;
|
|
372
428
|
}
|
|
429
|
+
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure */
|
|
373
430
|
export interface AllowedMentions {
|
|
374
431
|
parse?: Array<AllowedMentionTypes>;
|
|
375
432
|
roles?: Array<snowflake>;
|
|
@@ -383,7 +440,15 @@ export interface RoleSubscriptionData {
|
|
|
383
440
|
totalMonthsSubscribed: number;
|
|
384
441
|
isRenewal: boolean;
|
|
385
442
|
}
|
|
443
|
+
/** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
|
|
386
444
|
export interface MessagePin {
|
|
387
445
|
pinnetAt: timestamp;
|
|
388
446
|
message: Message;
|
|
389
447
|
}
|
|
448
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
449
|
+
export interface SharedClientTheme {
|
|
450
|
+
colors: Array<string>;
|
|
451
|
+
gradientAngle: number;
|
|
452
|
+
baseMix: number;
|
|
453
|
+
baseTheme?: BaseThemeTypes | null;
|
|
454
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "3.0.1-dev.
|
|
3
|
+
"version": "3.0.1-dev.a547862",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"wrapper"
|
|
20
20
|
],
|
|
21
|
-
"author": "
|
|
21
|
+
"author": "Sergio Gotuzzo",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/sergiogotuzzo/disgroove/issues"
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"@types/node": "^22.19.3",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
30
|
"typescript": "^5.9.3",
|
|
31
|
-
"undici-types": "^7.18.2"
|
|
31
|
+
"undici-types": "^7.18.2",
|
|
32
|
+
"@types/bun": "latest"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"ws": "^8.19.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "3.0.1-dev.
|
|
3
|
+
"version": "3.0.1-dev.a547862",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"wrapper"
|
|
20
20
|
],
|
|
21
|
-
"author": "
|
|
21
|
+
"author": "Sergio Gotuzzo",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/sergiogotuzzo/disgroove/issues"
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"@types/node": "^22.19.3",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
30
|
"typescript": "^5.9.3",
|
|
31
|
-
"undici-types": "^7.18.2"
|
|
31
|
+
"undici-types": "^7.18.2",
|
|
32
|
+
"@types/bun": "latest"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"ws": "^8.19.0"
|
|
35
36
|
}
|
|
36
|
-
}
|
|
37
|
+
}
|