disgroove 3.0.1-dev.6e60c8d → 3.0.1-dev.7231e6e
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/dist/lib/Client.d.ts +95 -11
- package/dist/lib/Client.js +133 -23
- package/dist/lib/constants.d.ts +89 -9
- package/dist/lib/constants.js +95 -5
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +25 -1
- package/dist/lib/gateway/Shard.js +1 -0
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +8 -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/ApplicationCommands.js +2 -0
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Channels.d.ts +3 -0
- package/dist/lib/transformers/Channels.js +24 -0
- package/dist/lib/transformers/Components.d.ts +1 -1
- package/dist/lib/transformers/Components.js +10 -0
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Lobbies.d.ts +3 -1
- package/dist/lib/transformers/Lobbies.js +31 -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-command.d.ts +2 -0
- package/dist/lib/types/application.d.ts +4 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/channel.d.ts +4 -2
- package/dist/lib/types/components.d.ts +11 -3
- package/dist/lib/types/gateway-events.d.ts +66 -2
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/lobby.d.ts +38 -1
- package/dist/lib/types/message.d.ts +86 -1
- package/dist/package.json +4 -3
- package/package.json +5 -4
|
@@ -19,7 +19,7 @@ export interface RawChannel {
|
|
|
19
19
|
recipients?: Array<RawUser>;
|
|
20
20
|
icon?: string | null;
|
|
21
21
|
owner_id?: snowflake;
|
|
22
|
-
application_id?: snowflake;
|
|
22
|
+
application_id?: snowflake | null;
|
|
23
23
|
managed?: boolean;
|
|
24
24
|
parent_id?: snowflake | null;
|
|
25
25
|
last_pin_timestamp?: timestamp | null;
|
|
@@ -31,6 +31,7 @@ export interface RawChannel {
|
|
|
31
31
|
member?: RawThreadMember;
|
|
32
32
|
default_auto_archive_duration?: number;
|
|
33
33
|
permissions?: string;
|
|
34
|
+
app_permissions?: string;
|
|
34
35
|
flags?: ChannelFlags;
|
|
35
36
|
total_message_sent?: number;
|
|
36
37
|
available_tags?: Array<RawForumTag>;
|
|
@@ -99,7 +100,7 @@ export interface Channel {
|
|
|
99
100
|
recipients?: Array<User>;
|
|
100
101
|
icon?: string | null;
|
|
101
102
|
ownerId?: snowflake;
|
|
102
|
-
applicationId?: snowflake;
|
|
103
|
+
applicationId?: snowflake | null;
|
|
103
104
|
managed?: boolean;
|
|
104
105
|
parentId?: snowflake | null;
|
|
105
106
|
lastPinTimestamp?: timestamp | null;
|
|
@@ -111,6 +112,7 @@ export interface Channel {
|
|
|
111
112
|
member?: ThreadMember;
|
|
112
113
|
defaultAutoArchiveDuration?: number;
|
|
113
114
|
permissions?: string;
|
|
115
|
+
appPermissions?: string;
|
|
114
116
|
flags?: ChannelFlags;
|
|
115
117
|
totalMessageSent?: number;
|
|
116
118
|
availableTags?: Array<ForumTag>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles } from "../constants";
|
|
1
|
+
import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles, UnfurledMediaItemFlags } from "../constants";
|
|
2
2
|
import type { snowflake } from "./common";
|
|
3
3
|
import type { RawEmoji, Emoji } from "./emoji";
|
|
4
4
|
import type { RawResolvedData, ResolvedData } from "./interaction";
|
|
@@ -15,7 +15,7 @@ export interface RawButton {
|
|
|
15
15
|
style: ButtonStyles;
|
|
16
16
|
label?: string;
|
|
17
17
|
emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
|
|
18
|
-
custom_id
|
|
18
|
+
custom_id?: string;
|
|
19
19
|
sku_id?: snowflake;
|
|
20
20
|
url?: string;
|
|
21
21
|
disabled?: boolean;
|
|
@@ -238,6 +238,7 @@ export interface RawFileUpload {
|
|
|
238
238
|
min_values?: number;
|
|
239
239
|
max_values?: number;
|
|
240
240
|
required?: boolean;
|
|
241
|
+
file_types?: Array<"image" | "video" | "audio" | string>;
|
|
241
242
|
}
|
|
242
243
|
/** https://discord.com/developers/docs/components/reference#file-upload-file-upload-interaction-response-structure */
|
|
243
244
|
export interface RawFileUploadInteractionResponse {
|
|
@@ -252,7 +253,10 @@ export interface RawUnfurledMediaItem {
|
|
|
252
253
|
proxy_url?: string;
|
|
253
254
|
height?: number | null;
|
|
254
255
|
width?: number | null;
|
|
256
|
+
placeholder?: string;
|
|
257
|
+
placeholder_version?: number;
|
|
255
258
|
content_type?: string;
|
|
259
|
+
flags?: UnfurledMediaItemFlags;
|
|
256
260
|
attachment_id?: snowflake;
|
|
257
261
|
}
|
|
258
262
|
/** https://docs.discord.com/developers/components/reference#radio-group-structure */
|
|
@@ -328,7 +332,7 @@ export interface Button {
|
|
|
328
332
|
style: ButtonStyles;
|
|
329
333
|
label?: string;
|
|
330
334
|
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
|
331
|
-
customId
|
|
335
|
+
customId?: string;
|
|
332
336
|
skuId?: snowflake;
|
|
333
337
|
url?: string;
|
|
334
338
|
disabled?: boolean;
|
|
@@ -551,6 +555,7 @@ export interface FileUpload {
|
|
|
551
555
|
minValues?: number;
|
|
552
556
|
maxValues?: number;
|
|
553
557
|
required?: boolean;
|
|
558
|
+
fileTypes?: Array<"image" | "video" | "audio" | string>;
|
|
554
559
|
}
|
|
555
560
|
/** https://discord.com/developers/docs/components/reference#file-upload-file-upload-interaction-response-structure */
|
|
556
561
|
export interface FileUploadInteractionResponse {
|
|
@@ -565,7 +570,10 @@ export interface UnfurledMediaItem {
|
|
|
565
570
|
proxyURL?: string;
|
|
566
571
|
height?: number | null;
|
|
567
572
|
width?: number | null;
|
|
573
|
+
placeholder?: string;
|
|
574
|
+
placeholderVersion?: number;
|
|
568
575
|
contentType?: string;
|
|
576
|
+
flags?: UnfurledMediaItemFlags;
|
|
569
577
|
attachmentId?: snowflake;
|
|
570
578
|
}
|
|
571
579
|
/** https://docs.discord.com/developers/components/reference#radio-group-structure */
|
|
@@ -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, GatewayCapabilities, 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 {
|
|
@@ -28,6 +28,7 @@ export interface RawIdentify {
|
|
|
28
28
|
shard?: [number, number];
|
|
29
29
|
presence?: Partial<Pick<RawGatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
|
30
30
|
intents: GatewayIntents;
|
|
31
|
+
capabilities?: GatewayCapabilities;
|
|
31
32
|
}
|
|
32
33
|
/** https://discord.com/developers/docs/events/gateway-events#identify-identify-connection-properties */
|
|
33
34
|
export interface RawIdentifyConnectionProperties {
|
|
@@ -54,6 +55,11 @@ export interface RawRequestGuildMembers {
|
|
|
54
55
|
export interface RawRequestSoundboardSounds {
|
|
55
56
|
guild_ids: Array<snowflake>;
|
|
56
57
|
}
|
|
58
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
59
|
+
export interface RawRequestChannelInfo {
|
|
60
|
+
guild_id: snowflake;
|
|
61
|
+
fields: Array<string>;
|
|
62
|
+
}
|
|
57
63
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
58
64
|
export interface RawGatewayPresenceUpdate {
|
|
59
65
|
since: number | null;
|
|
@@ -92,6 +98,29 @@ export interface RawAutoModerationActionExecutionEvent {
|
|
|
92
98
|
matched_keyword: string | null;
|
|
93
99
|
matched_content: string | null;
|
|
94
100
|
}
|
|
101
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
102
|
+
export interface RawChannelInfoEvent {
|
|
103
|
+
guild_id: snowflake;
|
|
104
|
+
channels: Array<RawChannelInfoChannel>;
|
|
105
|
+
}
|
|
106
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
107
|
+
export interface RawChannelInfoChannel {
|
|
108
|
+
id: snowflake;
|
|
109
|
+
status?: string | null;
|
|
110
|
+
voice_start_time?: number | null;
|
|
111
|
+
}
|
|
112
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
113
|
+
export interface RawVoiceChannelStatusUpdateEvent {
|
|
114
|
+
id: snowflake;
|
|
115
|
+
guild_id: snowflake;
|
|
116
|
+
status: string | null;
|
|
117
|
+
}
|
|
118
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
119
|
+
export interface RawVoiceChannelStartTimeUpdateEvent {
|
|
120
|
+
id: snowflake;
|
|
121
|
+
guild_id: snowflake;
|
|
122
|
+
voice_start_time?: number | null;
|
|
123
|
+
}
|
|
95
124
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
96
125
|
export interface RawThreadListSyncEvent {
|
|
97
126
|
guild_id: snowflake;
|
|
@@ -185,6 +214,7 @@ export interface RawGuildMemberUpdateEvent {
|
|
|
185
214
|
communication_disabled_until?: number | null;
|
|
186
215
|
flags?: GuildMemberFlags;
|
|
187
216
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
217
|
+
collectibles?: RawCollectibles | null;
|
|
188
218
|
}
|
|
189
219
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
190
220
|
export interface RawGuildMembersChunkEvent {
|
|
@@ -280,6 +310,7 @@ export interface RawMessageCreateEventExtra {
|
|
|
280
310
|
guild_id?: snowflake;
|
|
281
311
|
member?: RawGuildMember;
|
|
282
312
|
mentions: Array<RawUser>;
|
|
313
|
+
channel_type?: ChannelTypes;
|
|
283
314
|
}
|
|
284
315
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
285
316
|
export interface RawMessageDeleteEvent {
|
|
@@ -342,6 +373,7 @@ export interface RawClientStatus {
|
|
|
342
373
|
desktop?: string;
|
|
343
374
|
mobile?: string;
|
|
344
375
|
web?: string;
|
|
376
|
+
vr?: string;
|
|
345
377
|
}
|
|
346
378
|
/** https://discord.com/developers/docs/events/gateway-events#activity-object-activity-structure */
|
|
347
379
|
export interface RawActivity {
|
|
@@ -468,6 +500,7 @@ export interface Identify {
|
|
|
468
500
|
shard?: [number, number];
|
|
469
501
|
presence?: Partial<Pick<GatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
|
470
502
|
intents: GatewayIntents;
|
|
503
|
+
capabilities?: GatewayCapabilities;
|
|
471
504
|
}
|
|
472
505
|
/** https://discord.com/developers/docs/events/gateway-events#identify-identify-connection-properties */
|
|
473
506
|
export interface IdentifyConnectionProperties {
|
|
@@ -494,6 +527,11 @@ export interface RequestGuildMembers {
|
|
|
494
527
|
export interface RequestSoundboardSounds {
|
|
495
528
|
guildIds: Array<snowflake>;
|
|
496
529
|
}
|
|
530
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
531
|
+
export interface RequestChannelInfo {
|
|
532
|
+
guildId: snowflake;
|
|
533
|
+
fields: Array<string>;
|
|
534
|
+
}
|
|
497
535
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
498
536
|
export interface GatewayPresenceUpdate {
|
|
499
537
|
since: number | null;
|
|
@@ -532,6 +570,29 @@ export interface AutoModerationActionExecutionEvent {
|
|
|
532
570
|
matchedKeyword: string | null;
|
|
533
571
|
matchedContent: string | null;
|
|
534
572
|
}
|
|
573
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
574
|
+
export interface ChannelInfoEvent {
|
|
575
|
+
guildId: snowflake;
|
|
576
|
+
channels: Array<RawChannelInfoChannel>;
|
|
577
|
+
}
|
|
578
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
579
|
+
export interface ChannelInfoChannel {
|
|
580
|
+
id: snowflake;
|
|
581
|
+
status?: string | null;
|
|
582
|
+
voiceStartTime?: number | null;
|
|
583
|
+
}
|
|
584
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
585
|
+
export interface VoiceChannelStatusUpdateEvent {
|
|
586
|
+
id: snowflake;
|
|
587
|
+
guildId: snowflake;
|
|
588
|
+
status: string | null;
|
|
589
|
+
}
|
|
590
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
591
|
+
export interface VoiceChannelStartTimeUpdateEvent {
|
|
592
|
+
id: snowflake;
|
|
593
|
+
guildId: snowflake;
|
|
594
|
+
voiceStartTime?: number | null;
|
|
595
|
+
}
|
|
535
596
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
536
597
|
export interface ThreadListSyncEvent {
|
|
537
598
|
guildId: snowflake;
|
|
@@ -625,6 +686,7 @@ export interface GuildMemberUpdateEvent {
|
|
|
625
686
|
communicationDisabledUntil?: number | null;
|
|
626
687
|
flags?: GuildMemberFlags;
|
|
627
688
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
689
|
+
collectibles?: Collectibles | null;
|
|
628
690
|
}
|
|
629
691
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
630
692
|
export interface GuildMembersChunkEvent {
|
|
@@ -720,6 +782,7 @@ export interface MessageCreateEventExtra {
|
|
|
720
782
|
guildId?: snowflake;
|
|
721
783
|
member?: GuildMember;
|
|
722
784
|
mentions: Array<User>;
|
|
785
|
+
channelType?: ChannelTypes;
|
|
723
786
|
}
|
|
724
787
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
725
788
|
export interface MessageDeleteEvent {
|
|
@@ -782,6 +845,7 @@ export interface ClientStatus {
|
|
|
782
845
|
desktop?: string;
|
|
783
846
|
mobile?: string;
|
|
784
847
|
web?: string;
|
|
848
|
+
vr?: string;
|
|
785
849
|
}
|
|
786
850
|
/** https://discord.com/developers/docs/events/gateway-events#activity-object-activity-structure */
|
|
787
851
|
export interface Activity {
|
|
@@ -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 {
|
|
@@ -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;
|
|
@@ -14,6 +15,24 @@ export interface RawLobbyMember {
|
|
|
14
15
|
id: snowflake;
|
|
15
16
|
metadata?: Record<string, string> | null;
|
|
16
17
|
flags?: LobbyMemberFlags;
|
|
18
|
+
additional_name?: string;
|
|
19
|
+
}
|
|
20
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
21
|
+
export interface RawLobbyMessage {
|
|
22
|
+
id: snowflake;
|
|
23
|
+
type: MessageTypes;
|
|
24
|
+
content: string;
|
|
25
|
+
lobby_id: snowflake;
|
|
26
|
+
channel_id: snowflake;
|
|
27
|
+
author: RawUser;
|
|
28
|
+
metadata?: Record<string, string> | null;
|
|
29
|
+
moderation_metadata?: Record<string, string> | null;
|
|
30
|
+
flags: MessageFlags;
|
|
31
|
+
application_id: snowflake;
|
|
32
|
+
}
|
|
33
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
34
|
+
export interface RawLobbyInvite {
|
|
35
|
+
code: string;
|
|
17
36
|
}
|
|
18
37
|
/** https://discord.com/developers/docs/resources/lobby#lobby-object */
|
|
19
38
|
export interface Lobby {
|
|
@@ -28,4 +47,22 @@ export interface LobbyMember {
|
|
|
28
47
|
id: snowflake;
|
|
29
48
|
metadata?: Record<string, string> | null;
|
|
30
49
|
flags?: LobbyMemberFlags;
|
|
50
|
+
additionalName?: string;
|
|
51
|
+
}
|
|
52
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
53
|
+
export interface LobbyMessage {
|
|
54
|
+
id: snowflake;
|
|
55
|
+
type: MessageTypes;
|
|
56
|
+
content: string;
|
|
57
|
+
lobbyId: snowflake;
|
|
58
|
+
channelId: snowflake;
|
|
59
|
+
author: User;
|
|
60
|
+
metadata?: Record<string, string> | null;
|
|
61
|
+
moderationMetadata?: Record<string, string> | null;
|
|
62
|
+
flags: MessageFlags;
|
|
63
|
+
applicationId: snowflake;
|
|
64
|
+
}
|
|
65
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
66
|
+
export interface LobbyInvite {
|
|
67
|
+
code: string;
|
|
31
68
|
}
|
|
@@ -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,19 @@ 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;
|
|
199
|
+
}
|
|
200
|
+
/** https://docs.discord.com/developers/resources/message#attachment-object-attachment-request-structure */
|
|
201
|
+
export interface RawAttachmentRequest {
|
|
202
|
+
id: snowflake | number;
|
|
203
|
+
filename?: string;
|
|
204
|
+
title?: string;
|
|
205
|
+
description?: string;
|
|
206
|
+
duration_secs?: number;
|
|
207
|
+
waveform?: string;
|
|
208
|
+
is_spoiler?: boolean;
|
|
184
209
|
}
|
|
185
210
|
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
186
211
|
export interface RawChannelMention {
|
|
@@ -208,6 +233,14 @@ export interface RawMessagePin {
|
|
|
208
233
|
pinnet_at: timestamp;
|
|
209
234
|
message: RawMessage;
|
|
210
235
|
}
|
|
236
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
237
|
+
export interface RawSharedClientTheme {
|
|
238
|
+
colors: Array<string>;
|
|
239
|
+
gradient_angle: number;
|
|
240
|
+
base_mix: number;
|
|
241
|
+
base_theme?: BaseThemeTypes | null;
|
|
242
|
+
}
|
|
243
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-structure */
|
|
211
244
|
export interface Message {
|
|
212
245
|
id: snowflake;
|
|
213
246
|
channelId: snowflake;
|
|
@@ -245,11 +278,14 @@ export interface Message {
|
|
|
245
278
|
resolved?: ResolvedData;
|
|
246
279
|
poll?: Poll;
|
|
247
280
|
call?: MessageCall;
|
|
281
|
+
sharedClientTheme?: SharedClientTheme;
|
|
248
282
|
}
|
|
283
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
249
284
|
export interface MessageActivity {
|
|
250
285
|
type: MessageActivityTypes;
|
|
251
286
|
partyId?: string;
|
|
252
287
|
}
|
|
288
|
+
/** https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-interaction-metadata-structure */
|
|
253
289
|
export interface MessageInteractionMetadata {
|
|
254
290
|
id: snowflake;
|
|
255
291
|
type: InteractionType;
|
|
@@ -259,10 +295,12 @@ export interface MessageInteractionMetadata {
|
|
|
259
295
|
interactedMessageId?: snowflake;
|
|
260
296
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
|
261
297
|
}
|
|
298
|
+
/** https://discord.com/developers/docs/resources/message#message-call-object-message-call-object-structure */
|
|
262
299
|
export interface MessageCall {
|
|
263
300
|
partecipants: Array<snowflake>;
|
|
264
301
|
endedTimestamp?: timestamp | null;
|
|
265
302
|
}
|
|
303
|
+
/** https://discord.com/developers/docs/resources/message#message-reference-object-message-reference-structure */
|
|
266
304
|
export interface MessageReference {
|
|
267
305
|
type?: MessageReferenceTypes;
|
|
268
306
|
messageId?: snowflake;
|
|
@@ -270,9 +308,11 @@ export interface MessageReference {
|
|
|
270
308
|
guildId?: snowflake;
|
|
271
309
|
failIfNotExists?: boolean;
|
|
272
310
|
}
|
|
311
|
+
/** https://discord.com/developers/docs/resources/message#message-snapshot-object-message-snapshot-structure */
|
|
273
312
|
export interface MessageSnapshot {
|
|
274
313
|
message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles" | "stickers" | "stickerItems" | "components">;
|
|
275
314
|
}
|
|
315
|
+
/** https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure */
|
|
276
316
|
export interface Reaction {
|
|
277
317
|
count: number;
|
|
278
318
|
countDetails: ReactionCountDetails;
|
|
@@ -281,10 +321,12 @@ export interface Reaction {
|
|
|
281
321
|
emoji: Emoji;
|
|
282
322
|
burstColors: Array<string>;
|
|
283
323
|
}
|
|
324
|
+
/** https://discord.com/developers/docs/resources/message#reaction-count-details-object-reaction-count-details-structure */
|
|
284
325
|
export interface ReactionCountDetails {
|
|
285
326
|
burst: number;
|
|
286
327
|
normal: number;
|
|
287
328
|
}
|
|
329
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
|
|
288
330
|
export interface Embed {
|
|
289
331
|
title?: string;
|
|
290
332
|
type?: EmbedTypes;
|
|
@@ -299,45 +341,64 @@ export interface Embed {
|
|
|
299
341
|
provider?: EmbedProvider;
|
|
300
342
|
author?: EmbedAuthor;
|
|
301
343
|
fields?: Array<EmbedField>;
|
|
344
|
+
flags?: EmbedFlags;
|
|
302
345
|
}
|
|
346
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
303
347
|
export interface EmbedThumbnail {
|
|
304
348
|
url: string;
|
|
305
349
|
proxyURL?: string;
|
|
306
350
|
height?: number;
|
|
307
351
|
width?: number;
|
|
308
352
|
}
|
|
353
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure */
|
|
309
354
|
export interface EmbedVideo {
|
|
310
355
|
url?: string;
|
|
311
356
|
proxyURL?: string;
|
|
312
357
|
height?: number;
|
|
313
358
|
width?: number;
|
|
359
|
+
contentType?: string;
|
|
360
|
+
placeholder?: string;
|
|
361
|
+
placeholderVersion?: number;
|
|
362
|
+
description?: string;
|
|
363
|
+
flags?: EmbedMediaFlags;
|
|
314
364
|
}
|
|
365
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
315
366
|
export interface EmbedImage {
|
|
316
367
|
url: string;
|
|
317
368
|
proxyURL?: string;
|
|
318
369
|
height?: number;
|
|
319
370
|
width?: number;
|
|
371
|
+
contentType?: string;
|
|
372
|
+
placeholder?: string;
|
|
373
|
+
placeholderVersion?: number;
|
|
374
|
+
description?: string;
|
|
375
|
+
flags?: EmbedMediaFlags;
|
|
320
376
|
}
|
|
377
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
321
378
|
export interface EmbedProvider {
|
|
322
379
|
name?: string;
|
|
323
380
|
url?: string;
|
|
324
381
|
}
|
|
382
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure */
|
|
325
383
|
export interface EmbedAuthor {
|
|
326
384
|
name: string;
|
|
327
385
|
url?: string;
|
|
328
386
|
iconURL?: string;
|
|
329
387
|
proxyIconURL?: string;
|
|
330
388
|
}
|
|
389
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure */
|
|
331
390
|
export interface EmbedFooter {
|
|
332
391
|
text: string;
|
|
333
392
|
iconURL?: string;
|
|
334
393
|
proxyIconURL?: string;
|
|
335
394
|
}
|
|
395
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure */
|
|
336
396
|
export interface EmbedField {
|
|
337
397
|
name: string;
|
|
338
398
|
value: string;
|
|
339
399
|
inline?: boolean;
|
|
340
400
|
}
|
|
401
|
+
/** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
|
|
341
402
|
export interface PollResultEmbedFields {
|
|
342
403
|
pollQuestionText: string;
|
|
343
404
|
victorAnswerVotes: Array<number>;
|
|
@@ -348,6 +409,7 @@ export interface PollResultEmbedFields {
|
|
|
348
409
|
victorAnswerEmojiName?: string;
|
|
349
410
|
victorAnswerEmojiAnimated?: boolean;
|
|
350
411
|
}
|
|
412
|
+
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
|
|
351
413
|
export interface Attachment {
|
|
352
414
|
id: snowflake;
|
|
353
415
|
filename: string;
|
|
@@ -363,13 +425,28 @@ export interface Attachment {
|
|
|
363
425
|
durationSecs?: number;
|
|
364
426
|
waveform?: boolean;
|
|
365
427
|
flags?: AttachmentFlags;
|
|
428
|
+
clipParticipants?: Array<User>;
|
|
429
|
+
clipCreatedAt?: timestamp;
|
|
430
|
+
application?: Application | null;
|
|
431
|
+
}
|
|
432
|
+
/** https://docs.discord.com/developers/resources/message#attachment-object-attachment-request-structure */
|
|
433
|
+
export interface AttachmentRequest {
|
|
434
|
+
id: snowflake | number;
|
|
435
|
+
filename?: string;
|
|
436
|
+
title?: string;
|
|
437
|
+
description?: string;
|
|
438
|
+
durationSecs?: number;
|
|
439
|
+
waveform?: string;
|
|
440
|
+
isSpoiler?: boolean;
|
|
366
441
|
}
|
|
442
|
+
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
367
443
|
export interface ChannelMention {
|
|
368
444
|
id: snowflake;
|
|
369
445
|
guildId: snowflake;
|
|
370
446
|
type: ChannelTypes;
|
|
371
447
|
name: string;
|
|
372
448
|
}
|
|
449
|
+
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure */
|
|
373
450
|
export interface AllowedMentions {
|
|
374
451
|
parse?: Array<AllowedMentionTypes>;
|
|
375
452
|
roles?: Array<snowflake>;
|
|
@@ -383,7 +460,15 @@ export interface RoleSubscriptionData {
|
|
|
383
460
|
totalMonthsSubscribed: number;
|
|
384
461
|
isRenewal: boolean;
|
|
385
462
|
}
|
|
463
|
+
/** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
|
|
386
464
|
export interface MessagePin {
|
|
387
465
|
pinnetAt: timestamp;
|
|
388
466
|
message: Message;
|
|
389
467
|
}
|
|
468
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
469
|
+
export interface SharedClientTheme {
|
|
470
|
+
colors: Array<string>;
|
|
471
|
+
gradientAngle: number;
|
|
472
|
+
baseMix: number;
|
|
473
|
+
baseTheme?: BaseThemeTypes | null;
|
|
474
|
+
}
|
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.7231e6e",
|
|
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.7231e6e",
|
|
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
|
+
}
|