disgroove 2.2.7-dev.96a3d2f → 2.2.7-dev.ee0727b
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/dist/lib/Client.d.ts +46 -10
- package/dist/lib/Client.js +99 -5
- package/dist/lib/constants.d.ts +28 -21
- package/dist/lib/constants.js +32 -24
- package/dist/lib/gateway/Shard.js +1 -0
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/rest/Endpoints.d.ts +4 -0
- package/dist/lib/rest/Endpoints.js +10 -1
- package/dist/lib/transformers/Components.d.ts +13 -3
- package/dist/lib/transformers/Components.js +277 -150
- package/dist/lib/transformers/Interactions.js +283 -38
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +20 -34
- package/dist/lib/transformers/Roles.js +2 -2
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/components.d.ts +450 -0
- package/dist/lib/types/components.js +2 -0
- package/dist/lib/types/gateway-events.d.ts +3 -1
- package/dist/lib/types/guild.d.ts +7 -5
- package/dist/lib/types/interaction.d.ts +12 -8
- package/dist/lib/types/lobby.d.ts +29 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message-components.d.ts +334 -118
- package/dist/lib/types/message.d.ts +3 -5
- package/dist/lib/types/role.d.ts +2 -2
- package/dist/lib/utils/formatters.d.ts +1 -1
- package/dist/lib/utils/formatters.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/Client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
|
-
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes } from "./constants";
|
|
4
|
+
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes, type LobbyMemberFlags } from "./constants";
|
|
5
5
|
import { RequestManager, type FileData } from "./rest";
|
|
6
6
|
import EventEmitter from "node:events";
|
|
7
7
|
import { Shard } from "./gateway";
|
|
@@ -29,9 +29,11 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
|
|
|
29
29
|
import type { VoiceRegion, VoiceState } from "./types/voice";
|
|
30
30
|
import type { Webhook } from "./types/webhook";
|
|
31
31
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
|
32
|
-
import type { Embed, AllowedMentions, Attachment, Message, MessageReference,
|
|
32
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin } from "./types/message";
|
|
33
33
|
import type { Subscription } from "./types/subscription";
|
|
34
34
|
import type { SoundboardSound } from "./types/soundboard";
|
|
35
|
+
import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/components";
|
|
36
|
+
import type { Lobby, LobbyMember } from "./types/lobby";
|
|
35
37
|
export interface GatewayOptions {
|
|
36
38
|
properties?: IdentifyConnectionProperties;
|
|
37
39
|
compress?: boolean;
|
|
@@ -77,6 +79,11 @@ export declare class Client extends EventEmitter {
|
|
|
77
79
|
}): Promise<GuildMember | null>;
|
|
78
80
|
/** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
|
|
79
81
|
addGuildMemberRole(guildID: snowflake, userID: snowflake, roleID: snowflake, reason?: string): void;
|
|
82
|
+
/** https://discord.com/developers/docs/resources/lobby#add-a-member-to-a-lobby */
|
|
83
|
+
addLobbyMember(lobbyID: snowflake, userID: snowflake, options: {
|
|
84
|
+
metadata?: Record<string, string> | null;
|
|
85
|
+
flags?: LobbyMemberFlags;
|
|
86
|
+
}): Promise<LobbyMember>;
|
|
80
87
|
/** https://discord.com/developers/docs/resources/channel#add-thread-member */
|
|
81
88
|
addThreadMember(channelID: snowflake, userID: snowflake): void;
|
|
82
89
|
/** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
|
|
@@ -275,7 +282,7 @@ export declare class Client extends EventEmitter {
|
|
|
275
282
|
tts?: boolean;
|
|
276
283
|
embeds?: Array<Embed>;
|
|
277
284
|
allowedMentions?: AllowedMentions;
|
|
278
|
-
components?: Array<
|
|
285
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
279
286
|
files?: Array<FileData> | null;
|
|
280
287
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
|
281
288
|
flags?: MessageFlags;
|
|
@@ -287,6 +294,12 @@ export declare class Client extends EventEmitter {
|
|
|
287
294
|
createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse & {
|
|
288
295
|
withResponse?: boolean;
|
|
289
296
|
}): Promise<void | InteractionCallbackResponse>;
|
|
297
|
+
/** https://discord.com/developers/docs/resources/lobby#create-lobby */
|
|
298
|
+
createLobby(options: {
|
|
299
|
+
metadata?: Record<string, string> | null;
|
|
300
|
+
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags">>;
|
|
301
|
+
idleTimeoutSeconds?: number;
|
|
302
|
+
}): Promise<Lobby>;
|
|
290
303
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
|
291
304
|
createMessage(channelID: snowflake, options: {
|
|
292
305
|
content?: string;
|
|
@@ -295,7 +308,7 @@ export declare class Client extends EventEmitter {
|
|
|
295
308
|
embeds?: Array<Embed>;
|
|
296
309
|
allowedMentions?: AllowedMentions;
|
|
297
310
|
messageReference?: MessageReference;
|
|
298
|
-
components?: Array<
|
|
311
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
299
312
|
stickersIDs?: Array<snowflake>;
|
|
300
313
|
files?: Array<FileData>;
|
|
301
314
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
|
@@ -328,7 +341,7 @@ export declare class Client extends EventEmitter {
|
|
|
328
341
|
content?: string;
|
|
329
342
|
embeds?: Array<Embed>;
|
|
330
343
|
allowedMentions?: AllowedMentions;
|
|
331
|
-
components?: Array<
|
|
344
|
+
components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
|
|
332
345
|
stickerIDs?: Array<snowflake>;
|
|
333
346
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
|
334
347
|
flags?: MessageFlags;
|
|
@@ -386,6 +399,8 @@ export declare class Client extends EventEmitter {
|
|
|
386
399
|
deleteInteractionFollowupMessage(applicationID: snowflake, interactionToken: string, messageID: snowflake): void;
|
|
387
400
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response */
|
|
388
401
|
deleteInteractionResponse(applicationID: snowflake, interactionToken: string): void;
|
|
402
|
+
/** https://discord.com/developers/docs/resources/lobby#delete-lobby */
|
|
403
|
+
deleteLobby(lobbyID: snowflake): void;
|
|
389
404
|
/** https://discord.com/developers/docs/resources/message#delete-message */
|
|
390
405
|
deleteMessage(channelID: snowflake, messageID: snowflake, reason?: string): void;
|
|
391
406
|
/** https://discord.com/developers/docs/resources/message#delete-user-reaction */
|
|
@@ -472,6 +487,9 @@ export declare class Client extends EventEmitter {
|
|
|
472
487
|
/** https://discord.com/developers/docs/resources/guild#modify-current-member */
|
|
473
488
|
editCurrentGuildMember(guildID: snowflake, options: {
|
|
474
489
|
nick?: string | null;
|
|
490
|
+
banner?: string | null;
|
|
491
|
+
avatar?: string | null;
|
|
492
|
+
bio?: string | null;
|
|
475
493
|
}, reason?: string): Promise<GuildMember>;
|
|
476
494
|
/** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
|
|
477
495
|
editCurrentUserVoiceState(guildID: snowflake, options: {
|
|
@@ -622,13 +640,19 @@ export declare class Client extends EventEmitter {
|
|
|
622
640
|
enabled?: boolean;
|
|
623
641
|
channelID?: boolean;
|
|
624
642
|
}, reason?: string): Promise<GuildWidgetSettings>;
|
|
643
|
+
/** https://discord.com/developers/docs/resources/lobby#modify-lobby */
|
|
644
|
+
editLobby(lobbyID: snowflake, options: {
|
|
645
|
+
metadata?: Record<string, string> | null;
|
|
646
|
+
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags">>;
|
|
647
|
+
idleTimeoutSeconds?: number;
|
|
648
|
+
}): Promise<Lobby>;
|
|
625
649
|
/** https://discord.com/developers/docs/resources/message#edit-message */
|
|
626
650
|
editMessage(channelID: snowflake, messageID: snowflake, options: {
|
|
627
651
|
content?: string | null;
|
|
628
652
|
embeds?: Array<Embed> | null;
|
|
629
653
|
flags?: MessageFlags | null;
|
|
630
654
|
allowedMentions?: AllowedMentions | null;
|
|
631
|
-
components?: Array<
|
|
655
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
632
656
|
files?: Array<FileData> | null;
|
|
633
657
|
attachments?: Array<Attachment> | null;
|
|
634
658
|
}): Promise<Message>;
|
|
@@ -642,7 +666,7 @@ export declare class Client extends EventEmitter {
|
|
|
642
666
|
content?: string | null;
|
|
643
667
|
embeds?: Array<Embed> | null;
|
|
644
668
|
allowedMentions?: AllowedMentions | null;
|
|
645
|
-
components?: Array<
|
|
669
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
646
670
|
files?: Array<FileData> | null;
|
|
647
671
|
attachments?: Array<Partial<Attachment>> | null;
|
|
648
672
|
poll?: PollCreateParams | null;
|
|
@@ -653,7 +677,7 @@ export declare class Client extends EventEmitter {
|
|
|
653
677
|
content?: string | null;
|
|
654
678
|
embeds?: Array<Embed> | null;
|
|
655
679
|
allowedMentions?: AllowedMentions | null;
|
|
656
|
-
components?: Array<
|
|
680
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
657
681
|
files?: Array<FileData> | null;
|
|
658
682
|
attachments?: Array<Partial<Attachment>> | null;
|
|
659
683
|
poll?: PollCreateParams | null;
|
|
@@ -675,7 +699,7 @@ export declare class Client extends EventEmitter {
|
|
|
675
699
|
content?: string | null;
|
|
676
700
|
embeds?: Array<Embed> | null;
|
|
677
701
|
allowedMentions?: AllowedMentions | null;
|
|
678
|
-
components?: Array<
|
|
702
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
679
703
|
files?: Array<FileData> | null;
|
|
680
704
|
attachments?: Array<Partial<Attachment>> | null;
|
|
681
705
|
poll?: PollCreateParams | null;
|
|
@@ -697,7 +721,7 @@ export declare class Client extends EventEmitter {
|
|
|
697
721
|
tts?: boolean;
|
|
698
722
|
embeds?: Array<Embed>;
|
|
699
723
|
allowedMentions?: AllowedMentions;
|
|
700
|
-
components?: Array<
|
|
724
|
+
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
701
725
|
files?: Array<FileData>;
|
|
702
726
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
|
703
727
|
flags?: MessageFlags;
|
|
@@ -933,6 +957,8 @@ export declare class Client extends EventEmitter {
|
|
|
933
957
|
members: Array<ThreadMember>;
|
|
934
958
|
hasMore: boolean;
|
|
935
959
|
}>;
|
|
960
|
+
/** https://discord.com/developers/docs/resources/lobby#get-lobby */
|
|
961
|
+
getLobby(lobbyID: snowflake): Promise<Lobby>;
|
|
936
962
|
/** https://discord.com/developers/docs/resources/message#get-channel-message */
|
|
937
963
|
getMessage(channelID: snowflake, messageID: snowflake): Promise<Message>;
|
|
938
964
|
/** https://discord.com/developers/docs/resources/message#get-reactions */
|
|
@@ -1022,10 +1048,16 @@ export declare class Client extends EventEmitter {
|
|
|
1022
1048
|
}): void;
|
|
1023
1049
|
/** https://discord.com/developers/docs/resources/user#leave-guild */
|
|
1024
1050
|
leaveGuild(guildID: snowflake): void;
|
|
1051
|
+
/** https://discord.com/developers/docs/resources/lobby#leave-lobby */
|
|
1052
|
+
leaveLobby(lobbyID: snowflake): void;
|
|
1025
1053
|
/** https://discord.com/developers/docs/resources/channel#leave-thread */
|
|
1026
1054
|
leaveThread(channelID: snowflake): void;
|
|
1027
1055
|
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
1028
1056
|
leaveVoiceChannel(guildID: snowflake): void;
|
|
1057
|
+
/** discord.com/developers/docs/resources/lobby#link-channel-to-lobby */
|
|
1058
|
+
linkChannel(lobbyID: snowflake, options: {
|
|
1059
|
+
channelID: snowflake;
|
|
1060
|
+
}): Promise<Lobby>;
|
|
1029
1061
|
/** https://discord.com/developers/docs/resources/channel#pin-message */
|
|
1030
1062
|
pinMessage(channelID: snowflake, messageID: snowflake, reason?: string): void;
|
|
1031
1063
|
/** https://discord.com/developers/docs/resources/guild#remove-guild-ban */
|
|
@@ -1036,6 +1068,8 @@ export declare class Client extends EventEmitter {
|
|
|
1036
1068
|
removeGuildMember(guildID: snowflake, userID: snowflake, reason?: string): void;
|
|
1037
1069
|
/** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
|
|
1038
1070
|
removeGuildMemberRole(guildID: snowflake, userID: snowflake, roleID: snowflake, reason?: string): void;
|
|
1071
|
+
/** https://discord.com/developers/docs/resources/lobby#remove-a-member-from-a-lobby */
|
|
1072
|
+
removeLobbyMember(lobbyID: snowflake, userID: snowflake): void;
|
|
1039
1073
|
/** https://discord.com/developers/docs/resources/channel#remove-thread-member */
|
|
1040
1074
|
removeThreadMember(channelID: snowflake, userID: snowflake): void;
|
|
1041
1075
|
/** https://discord.com/developers/docs/resources/guild#search-guild-members */
|
|
@@ -1054,6 +1088,8 @@ export declare class Client extends EventEmitter {
|
|
|
1054
1088
|
syncGuildTemplate(guildID: snowflake, code: string): Promise<GuildTemplate>;
|
|
1055
1089
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
1056
1090
|
triggerTypingIndicator(channelID: snowflake): void;
|
|
1091
|
+
/** https://discord.com/developers/docs/resources/lobby#unlink-channel-from-lobby */
|
|
1092
|
+
unlinkChannel(lobbyID: snowflake): Promise<Lobby>;
|
|
1057
1093
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
|
1058
1094
|
updateApplicationRoleConnectionMetadataRecords(applicationID: snowflake): Promise<Array<ApplicationRoleConnectionMetadata>>;
|
|
1059
1095
|
/** https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection */
|
package/dist/lib/Client.js
CHANGED
|
@@ -76,6 +76,13 @@ class Client extends node_events_1.default {
|
|
|
76
76
|
reason,
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
+
/** https://discord.com/developers/docs/resources/lobby#add-a-member-to-a-lobby */
|
|
80
|
+
async addLobbyMember(lobbyID, userID, options) {
|
|
81
|
+
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbyMember(lobbyID, userID), {
|
|
82
|
+
json: options,
|
|
83
|
+
});
|
|
84
|
+
return transformers_1.Lobbies.lobbyMemberFromRaw(response);
|
|
85
|
+
}
|
|
79
86
|
/** https://discord.com/developers/docs/resources/channel#add-thread-member */
|
|
80
87
|
addThreadMember(channelID, userID) {
|
|
81
88
|
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelID, userID));
|
|
@@ -333,6 +340,11 @@ class Client extends node_events_1.default {
|
|
|
333
340
|
name: options.name,
|
|
334
341
|
permissions: options.permissions,
|
|
335
342
|
color: options.color,
|
|
343
|
+
colors: {
|
|
344
|
+
primary_color: options.colors?.primaryColor,
|
|
345
|
+
secondary_color: options.colors?.secondaryColor,
|
|
346
|
+
tertiary_color: options.colors?.tertiaryColor,
|
|
347
|
+
},
|
|
336
348
|
hoist: options.hoist,
|
|
337
349
|
icon: options.icon,
|
|
338
350
|
unicode_emoji: options.unicodeEmoji,
|
|
@@ -465,7 +477,24 @@ class Client extends node_events_1.default {
|
|
|
465
477
|
: undefined,
|
|
466
478
|
flags: options.data?.flags,
|
|
467
479
|
components: options.data?.components !== undefined
|
|
468
|
-
?
|
|
480
|
+
? options.data?.components.map((component) => {
|
|
481
|
+
switch (component.type) {
|
|
482
|
+
case constants_1.ComponentTypes.ActionRow:
|
|
483
|
+
return transformers_1.Components.actionRowToRaw(component);
|
|
484
|
+
case constants_1.ComponentTypes.Section:
|
|
485
|
+
return transformers_1.Components.sectionToRaw(component);
|
|
486
|
+
case constants_1.ComponentTypes.TextDisplay:
|
|
487
|
+
return transformers_1.Components.textDisplayToRaw(component);
|
|
488
|
+
case constants_1.ComponentTypes.MediaGallery:
|
|
489
|
+
return transformers_1.Components.mediaGalleryToRaw(component);
|
|
490
|
+
case constants_1.ComponentTypes.File:
|
|
491
|
+
return transformers_1.Components.fileToRaw(component);
|
|
492
|
+
case constants_1.ComponentTypes.Separator:
|
|
493
|
+
return transformers_1.Components.separatorToRaw(component);
|
|
494
|
+
case constants_1.ComponentTypes.Container:
|
|
495
|
+
return transformers_1.Components.containerToRaw(component);
|
|
496
|
+
}
|
|
497
|
+
})
|
|
469
498
|
: undefined,
|
|
470
499
|
attachments: options.data?.attachments,
|
|
471
500
|
poll: options.data?.poll !== undefined
|
|
@@ -517,7 +546,16 @@ class Client extends node_events_1.default {
|
|
|
517
546
|
data: {
|
|
518
547
|
custom_id: options.data?.customID,
|
|
519
548
|
components: options.data?.components !== undefined
|
|
520
|
-
?
|
|
549
|
+
? options.data?.components.map((component) => {
|
|
550
|
+
switch (component.type) {
|
|
551
|
+
case constants_1.ComponentTypes.ActionRow:
|
|
552
|
+
return transformers_1.Components.actionRowToRaw(component);
|
|
553
|
+
case constants_1.ComponentTypes.TextDisplay:
|
|
554
|
+
return transformers_1.Components.textDisplayToRaw(component);
|
|
555
|
+
case constants_1.ComponentTypes.Label:
|
|
556
|
+
return transformers_1.Components.labelToRaw(component);
|
|
557
|
+
}
|
|
558
|
+
})
|
|
521
559
|
: undefined,
|
|
522
560
|
title: options.data?.title,
|
|
523
561
|
},
|
|
@@ -554,6 +592,17 @@ class Client extends node_events_1.default {
|
|
|
554
592
|
});
|
|
555
593
|
}
|
|
556
594
|
}
|
|
595
|
+
/** https://discord.com/developers/docs/resources/lobby#create-lobby */
|
|
596
|
+
async createLobby(options) {
|
|
597
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbies(), {
|
|
598
|
+
json: {
|
|
599
|
+
metadata: options.metadata,
|
|
600
|
+
members: options.members,
|
|
601
|
+
idle_timeout_seconds: options.idleTimeoutSeconds,
|
|
602
|
+
},
|
|
603
|
+
});
|
|
604
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
605
|
+
}
|
|
557
606
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
|
558
607
|
async createMessage(channelID, options) {
|
|
559
608
|
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessages(channelID), {
|
|
@@ -780,6 +829,10 @@ class Client extends node_events_1.default {
|
|
|
780
829
|
deleteInteractionResponse(applicationID, interactionToken) {
|
|
781
830
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationID, interactionToken));
|
|
782
831
|
}
|
|
832
|
+
/** https://discord.com/developers/docs/resources/lobby#delete-lobby */
|
|
833
|
+
deleteLobby(lobbyID) {
|
|
834
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobby(lobbyID));
|
|
835
|
+
}
|
|
783
836
|
/** https://discord.com/developers/docs/resources/message#delete-message */
|
|
784
837
|
deleteMessage(channelID, messageID, reason) {
|
|
785
838
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessage(channelID, messageID), {
|
|
@@ -936,9 +989,7 @@ class Client extends node_events_1.default {
|
|
|
936
989
|
/** https://discord.com/developers/docs/resources/guild#modify-current-member */
|
|
937
990
|
async editCurrentGuildMember(guildID, options, reason) {
|
|
938
991
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildID), {
|
|
939
|
-
json:
|
|
940
|
-
nick: options.nick,
|
|
941
|
-
},
|
|
992
|
+
json: options,
|
|
942
993
|
reason,
|
|
943
994
|
});
|
|
944
995
|
return transformers_1.Guilds.guildMemberFromRaw(response);
|
|
@@ -1119,6 +1170,11 @@ class Client extends node_events_1.default {
|
|
|
1119
1170
|
name: options?.name,
|
|
1120
1171
|
permissions: options?.permissions,
|
|
1121
1172
|
color: options?.color,
|
|
1173
|
+
colors: {
|
|
1174
|
+
primary_color: options?.colors?.primaryColor,
|
|
1175
|
+
secondary_color: options?.colors?.secondaryColor,
|
|
1176
|
+
tertiary_color: options?.colors?.tertiaryColor,
|
|
1177
|
+
},
|
|
1122
1178
|
hoist: options?.hoist,
|
|
1123
1179
|
icon: options?.icon,
|
|
1124
1180
|
unicode_emoji: options?.unicodeEmoji,
|
|
@@ -1234,6 +1290,17 @@ class Client extends node_events_1.default {
|
|
|
1234
1290
|
channelID: response.channel_id,
|
|
1235
1291
|
};
|
|
1236
1292
|
}
|
|
1293
|
+
/** https://discord.com/developers/docs/resources/lobby#modify-lobby */
|
|
1294
|
+
async editLobby(lobbyID, options) {
|
|
1295
|
+
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobby(lobbyID), {
|
|
1296
|
+
json: {
|
|
1297
|
+
metadata: options.metadata,
|
|
1298
|
+
members: options.members,
|
|
1299
|
+
idle_timeout_seconds: options.idleTimeoutSeconds,
|
|
1300
|
+
},
|
|
1301
|
+
});
|
|
1302
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
1303
|
+
}
|
|
1237
1304
|
/** https://discord.com/developers/docs/resources/message#edit-message */
|
|
1238
1305
|
async editMessage(channelID, messageID, options) {
|
|
1239
1306
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channelMessage(channelID, messageID), {
|
|
@@ -2102,6 +2169,11 @@ class Client extends node_events_1.default {
|
|
|
2102
2169
|
hasMore: response.has_more,
|
|
2103
2170
|
};
|
|
2104
2171
|
}
|
|
2172
|
+
/** https://discord.com/developers/docs/resources/lobby#get-lobby */
|
|
2173
|
+
async getLobby(lobbyID) {
|
|
2174
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.lobby(lobbyID));
|
|
2175
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
2176
|
+
}
|
|
2105
2177
|
/** https://discord.com/developers/docs/resources/message#get-channel-message */
|
|
2106
2178
|
async getMessage(channelID, messageID) {
|
|
2107
2179
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessage(channelID, messageID));
|
|
@@ -2299,6 +2371,10 @@ class Client extends node_events_1.default {
|
|
|
2299
2371
|
leaveGuild(guildID) {
|
|
2300
2372
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userGuild(guildID));
|
|
2301
2373
|
}
|
|
2374
|
+
/** https://discord.com/developers/docs/resources/lobby#leave-lobby */
|
|
2375
|
+
leaveLobby(lobbyID) {
|
|
2376
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobbyMember(lobbyID));
|
|
2377
|
+
}
|
|
2302
2378
|
/** https://discord.com/developers/docs/resources/channel#leave-thread */
|
|
2303
2379
|
leaveThread(channelID) {
|
|
2304
2380
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID, "@me"));
|
|
@@ -2312,6 +2388,15 @@ class Client extends node_events_1.default {
|
|
|
2312
2388
|
selfDeaf: false,
|
|
2313
2389
|
});
|
|
2314
2390
|
}
|
|
2391
|
+
/** discord.com/developers/docs/resources/lobby#link-channel-to-lobby */
|
|
2392
|
+
async linkChannel(lobbyID, options) {
|
|
2393
|
+
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobbyChannelLinking(lobbyID), {
|
|
2394
|
+
json: {
|
|
2395
|
+
channel_id: options.channelID,
|
|
2396
|
+
},
|
|
2397
|
+
});
|
|
2398
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
2399
|
+
}
|
|
2315
2400
|
/** https://discord.com/developers/docs/resources/channel#pin-message */
|
|
2316
2401
|
pinMessage(channelID, messageID, reason) {
|
|
2317
2402
|
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPin(channelID, messageID), {
|
|
@@ -2340,6 +2425,10 @@ class Client extends node_events_1.default {
|
|
|
2340
2425
|
reason,
|
|
2341
2426
|
});
|
|
2342
2427
|
}
|
|
2428
|
+
/** https://discord.com/developers/docs/resources/lobby#remove-a-member-from-a-lobby */
|
|
2429
|
+
removeLobbyMember(lobbyID, userID) {
|
|
2430
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobbyMember(lobbyID, userID));
|
|
2431
|
+
}
|
|
2343
2432
|
/** https://discord.com/developers/docs/resources/channel#remove-thread-member */
|
|
2344
2433
|
removeThreadMember(channelID, userID) {
|
|
2345
2434
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID, userID));
|
|
@@ -2376,6 +2465,11 @@ class Client extends node_events_1.default {
|
|
|
2376
2465
|
triggerTypingIndicator(channelID) {
|
|
2377
2466
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelTyping(channelID));
|
|
2378
2467
|
}
|
|
2468
|
+
/** https://discord.com/developers/docs/resources/lobby#unlink-channel-from-lobby */
|
|
2469
|
+
async unlinkChannel(lobbyID) {
|
|
2470
|
+
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobbyChannelLinking(lobbyID));
|
|
2471
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
2472
|
+
}
|
|
2379
2473
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
|
2380
2474
|
async updateApplicationRoleConnectionMetadataRecords(applicationID) {
|
|
2381
2475
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationID));
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -106,7 +106,19 @@ export declare enum InteractionContextTypes {
|
|
|
106
106
|
BotDM = 1,
|
|
107
107
|
PrivateChannel = 2
|
|
108
108
|
}
|
|
109
|
-
/** https://discord.com/developers/docs/interactions/
|
|
109
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
|
110
|
+
export declare enum InteractionCallbackType {
|
|
111
|
+
Pong = 1,
|
|
112
|
+
ChannelMessageWithSource = 4,
|
|
113
|
+
DeferredChannelMessageWithSource = 5,
|
|
114
|
+
DeferredUpdateMessage = 6,
|
|
115
|
+
UpdateMessage = 7,
|
|
116
|
+
ApplicationCommandAutocompleteResult = 8,
|
|
117
|
+
Modal = 9,
|
|
118
|
+
PremiumRequired = 10,
|
|
119
|
+
LaunchActivity = 12
|
|
120
|
+
}
|
|
121
|
+
/** https://discord.com/developers/docs/components/reference#component-object-component-types */
|
|
110
122
|
export declare enum ComponentTypes {
|
|
111
123
|
ActionRow = 1,
|
|
112
124
|
Button = 2,
|
|
@@ -122,26 +134,10 @@ export declare enum ComponentTypes {
|
|
|
122
134
|
MediaGallery = 12,
|
|
123
135
|
File = 13,
|
|
124
136
|
Separator = 14,
|
|
125
|
-
Container = 17
|
|
137
|
+
Container = 17,
|
|
138
|
+
Label = 18
|
|
126
139
|
}
|
|
127
|
-
/** https://discord.com/developers/docs/components/reference#
|
|
128
|
-
export declare enum SeparatorSpacing {
|
|
129
|
-
Small = 1,
|
|
130
|
-
Large = 2
|
|
131
|
-
}
|
|
132
|
-
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
|
133
|
-
export declare enum InteractionCallbackType {
|
|
134
|
-
Pong = 1,
|
|
135
|
-
ChannelMessageWithSource = 4,
|
|
136
|
-
DeferredChannelMessageWithSource = 5,
|
|
137
|
-
DeferredUpdateMessage = 6,
|
|
138
|
-
UpdateMessage = 7,
|
|
139
|
-
ApplicationCommandAutocompleteResult = 8,
|
|
140
|
-
Modal = 9,
|
|
141
|
-
PremiumRequired = 10,
|
|
142
|
-
LaunchActivity = 12
|
|
143
|
-
}
|
|
144
|
-
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
|
140
|
+
/** https://discord.com/developers/docs/components/reference#button-button-styles */
|
|
145
141
|
export declare enum ButtonStyles {
|
|
146
142
|
Primary = 1,
|
|
147
143
|
Secondary = 2,
|
|
@@ -150,11 +146,16 @@ export declare enum ButtonStyles {
|
|
|
150
146
|
Link = 5,
|
|
151
147
|
Premium = 6
|
|
152
148
|
}
|
|
153
|
-
/** https://discord.com/developers/docs/
|
|
149
|
+
/** https://discord.com/developers/docs/components/reference#text-input-text-input-styles */
|
|
154
150
|
export declare enum TextInputStyles {
|
|
155
151
|
Short = 1,
|
|
156
152
|
Paragraph = 2
|
|
157
153
|
}
|
|
154
|
+
/** https://discord.com/developers/docs/components/reference#separator-separator-structure */
|
|
155
|
+
export declare enum SeparatorSpacing {
|
|
156
|
+
Small = 1,
|
|
157
|
+
Large = 2
|
|
158
|
+
}
|
|
158
159
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
159
160
|
export declare enum ApplicationIntegrationTypes {
|
|
160
161
|
GuildInstall = 0,
|
|
@@ -518,6 +519,10 @@ export declare enum InviteTargetTypes {
|
|
|
518
519
|
export declare enum GuildInviteFlags {
|
|
519
520
|
IsGuestInvite = 1
|
|
520
521
|
}
|
|
522
|
+
/** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-flags */
|
|
523
|
+
export declare enum LobbyMemberFlags {
|
|
524
|
+
CanLinkLobby = 1
|
|
525
|
+
}
|
|
521
526
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
522
527
|
export declare enum MessageTypes {
|
|
523
528
|
Default = 0,
|
|
@@ -1174,6 +1179,7 @@ export declare enum JSONErrorCodes {
|
|
|
1174
1179
|
MessageBlockedByHarmfulLinksFilter = 240000,
|
|
1175
1180
|
CannotEnableOnboardingRequirementsAreNotMet = 350000,
|
|
1176
1181
|
CannotUpdateOnboardingWhileBelowRequirements = 350001,
|
|
1182
|
+
AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
|
|
1177
1183
|
FailedToBanUsers = 500000,
|
|
1178
1184
|
PollVotingBlocked = 520000,
|
|
1179
1185
|
PollExpired = 520001,
|
|
@@ -1262,6 +1268,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1262
1268
|
readonly SendVoiceMessages: bigint;
|
|
1263
1269
|
readonly SendPolls: bigint;
|
|
1264
1270
|
readonly UseExternalApps: bigint;
|
|
1271
|
+
readonly PinMessages: bigint;
|
|
1265
1272
|
};
|
|
1266
1273
|
/** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
|
|
1267
1274
|
export declare enum RoleFlags {
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.
|
|
4
|
-
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
|
|
3
|
+
exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
|
4
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
6
|
var TimestampStyles;
|
|
7
7
|
(function (TimestampStyles) {
|
|
@@ -120,7 +120,20 @@ var InteractionContextTypes;
|
|
|
120
120
|
InteractionContextTypes[InteractionContextTypes["BotDM"] = 1] = "BotDM";
|
|
121
121
|
InteractionContextTypes[InteractionContextTypes["PrivateChannel"] = 2] = "PrivateChannel";
|
|
122
122
|
})(InteractionContextTypes || (exports.InteractionContextTypes = InteractionContextTypes = {}));
|
|
123
|
-
/** https://discord.com/developers/docs/interactions/
|
|
123
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
|
124
|
+
var InteractionCallbackType;
|
|
125
|
+
(function (InteractionCallbackType) {
|
|
126
|
+
InteractionCallbackType[InteractionCallbackType["Pong"] = 1] = "Pong";
|
|
127
|
+
InteractionCallbackType[InteractionCallbackType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
|
|
128
|
+
InteractionCallbackType[InteractionCallbackType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
|
|
129
|
+
InteractionCallbackType[InteractionCallbackType["DeferredUpdateMessage"] = 6] = "DeferredUpdateMessage";
|
|
130
|
+
InteractionCallbackType[InteractionCallbackType["UpdateMessage"] = 7] = "UpdateMessage";
|
|
131
|
+
InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
|
|
132
|
+
InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
|
|
133
|
+
InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
|
|
134
|
+
InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
|
|
135
|
+
})(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
|
|
136
|
+
/** https://discord.com/developers/docs/components/reference#component-object-component-types */
|
|
124
137
|
var ComponentTypes;
|
|
125
138
|
(function (ComponentTypes) {
|
|
126
139
|
ComponentTypes[ComponentTypes["ActionRow"] = 1] = "ActionRow";
|
|
@@ -138,27 +151,9 @@ var ComponentTypes;
|
|
|
138
151
|
ComponentTypes[ComponentTypes["File"] = 13] = "File";
|
|
139
152
|
ComponentTypes[ComponentTypes["Separator"] = 14] = "Separator";
|
|
140
153
|
ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
|
|
154
|
+
ComponentTypes[ComponentTypes["Label"] = 18] = "Label";
|
|
141
155
|
})(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
|
|
142
|
-
/** https://discord.com/developers/docs/components/reference#
|
|
143
|
-
var SeparatorSpacing;
|
|
144
|
-
(function (SeparatorSpacing) {
|
|
145
|
-
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
|
146
|
-
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
|
147
|
-
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
|
148
|
-
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
|
149
|
-
var InteractionCallbackType;
|
|
150
|
-
(function (InteractionCallbackType) {
|
|
151
|
-
InteractionCallbackType[InteractionCallbackType["Pong"] = 1] = "Pong";
|
|
152
|
-
InteractionCallbackType[InteractionCallbackType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
|
|
153
|
-
InteractionCallbackType[InteractionCallbackType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
|
|
154
|
-
InteractionCallbackType[InteractionCallbackType["DeferredUpdateMessage"] = 6] = "DeferredUpdateMessage";
|
|
155
|
-
InteractionCallbackType[InteractionCallbackType["UpdateMessage"] = 7] = "UpdateMessage";
|
|
156
|
-
InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
|
|
157
|
-
InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
|
|
158
|
-
InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
|
|
159
|
-
InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
|
|
160
|
-
})(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
|
|
161
|
-
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
|
156
|
+
/** https://discord.com/developers/docs/components/reference#button-button-styles */
|
|
162
157
|
var ButtonStyles;
|
|
163
158
|
(function (ButtonStyles) {
|
|
164
159
|
ButtonStyles[ButtonStyles["Primary"] = 1] = "Primary";
|
|
@@ -168,12 +163,18 @@ var ButtonStyles;
|
|
|
168
163
|
ButtonStyles[ButtonStyles["Link"] = 5] = "Link";
|
|
169
164
|
ButtonStyles[ButtonStyles["Premium"] = 6] = "Premium";
|
|
170
165
|
})(ButtonStyles || (exports.ButtonStyles = ButtonStyles = {}));
|
|
171
|
-
/** https://discord.com/developers/docs/
|
|
166
|
+
/** https://discord.com/developers/docs/components/reference#text-input-text-input-styles */
|
|
172
167
|
var TextInputStyles;
|
|
173
168
|
(function (TextInputStyles) {
|
|
174
169
|
TextInputStyles[TextInputStyles["Short"] = 1] = "Short";
|
|
175
170
|
TextInputStyles[TextInputStyles["Paragraph"] = 2] = "Paragraph";
|
|
176
171
|
})(TextInputStyles || (exports.TextInputStyles = TextInputStyles = {}));
|
|
172
|
+
/** https://discord.com/developers/docs/components/reference#separator-separator-structure */
|
|
173
|
+
var SeparatorSpacing;
|
|
174
|
+
(function (SeparatorSpacing) {
|
|
175
|
+
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
|
176
|
+
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
|
177
|
+
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
|
177
178
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
178
179
|
var ApplicationIntegrationTypes;
|
|
179
180
|
(function (ApplicationIntegrationTypes) {
|
|
@@ -575,6 +576,11 @@ var GuildInviteFlags;
|
|
|
575
576
|
(function (GuildInviteFlags) {
|
|
576
577
|
GuildInviteFlags[GuildInviteFlags["IsGuestInvite"] = 1] = "IsGuestInvite";
|
|
577
578
|
})(GuildInviteFlags || (exports.GuildInviteFlags = GuildInviteFlags = {}));
|
|
579
|
+
/** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-flags */
|
|
580
|
+
var LobbyMemberFlags;
|
|
581
|
+
(function (LobbyMemberFlags) {
|
|
582
|
+
LobbyMemberFlags[LobbyMemberFlags["CanLinkLobby"] = 1] = "CanLinkLobby";
|
|
583
|
+
})(LobbyMemberFlags || (exports.LobbyMemberFlags = LobbyMemberFlags = {}));
|
|
578
584
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
579
585
|
var MessageTypes;
|
|
580
586
|
(function (MessageTypes) {
|
|
@@ -1263,6 +1269,7 @@ var JSONErrorCodes;
|
|
|
1263
1269
|
JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
|
|
1264
1270
|
JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
|
|
1265
1271
|
JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
|
|
1272
|
+
JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
|
|
1266
1273
|
JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
|
|
1267
1274
|
JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
|
|
1268
1275
|
JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
|
|
@@ -1353,6 +1360,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1353
1360
|
SendVoiceMessages: 1n << 46n,
|
|
1354
1361
|
SendPolls: 1n << 49n,
|
|
1355
1362
|
UseExternalApps: 1n << 50n,
|
|
1363
|
+
PinMessages: 1n << 51n,
|
|
1356
1364
|
};
|
|
1357
1365
|
/** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
|
|
1358
1366
|
var RoleFlags;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./types/audit-log";
|
|
|
8
8
|
export * from "./types/auto-moderation";
|
|
9
9
|
export * from "./types/channel";
|
|
10
10
|
export * from "./types/common";
|
|
11
|
+
export * from "./types/components";
|
|
11
12
|
export * from "./types/emoji";
|
|
12
13
|
export * from "./types/entitlements";
|
|
13
14
|
export * from "./types/gateway-events";
|
|
@@ -16,7 +17,6 @@ export * from "./types/guild-template";
|
|
|
16
17
|
export * from "./types/guild";
|
|
17
18
|
export * from "./types/interaction";
|
|
18
19
|
export * from "./types/invite";
|
|
19
|
-
export * from "./types/message-components";
|
|
20
20
|
export * from "./types/poll";
|
|
21
21
|
export * from "./types/role";
|
|
22
22
|
export * from "./types/sku";
|
package/dist/lib/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./types/audit-log"), exports);
|
|
|
24
24
|
__exportStar(require("./types/auto-moderation"), exports);
|
|
25
25
|
__exportStar(require("./types/channel"), exports);
|
|
26
26
|
__exportStar(require("./types/common"), exports);
|
|
27
|
+
__exportStar(require("./types/components"), exports);
|
|
27
28
|
__exportStar(require("./types/emoji"), exports);
|
|
28
29
|
__exportStar(require("./types/entitlements"), exports);
|
|
29
30
|
__exportStar(require("./types/gateway-events"), exports);
|
|
@@ -32,7 +33,6 @@ __exportStar(require("./types/guild-template"), exports);
|
|
|
32
33
|
__exportStar(require("./types/guild"), exports);
|
|
33
34
|
__exportStar(require("./types/interaction"), exports);
|
|
34
35
|
__exportStar(require("./types/invite"), exports);
|
|
35
|
-
__exportStar(require("./types/message-components"), exports);
|
|
36
36
|
__exportStar(require("./types/poll"), exports);
|
|
37
37
|
__exportStar(require("./types/role"), exports);
|
|
38
38
|
__exportStar(require("./types/sku"), exports);
|