disgroove 3.0.1-dev.b082a0c → 3.0.1-dev.b57a9f0
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 +78 -3
- package/dist/lib/Client.js +104 -1
- package/dist/lib/constants.d.ts +68 -6
- package/dist/lib/constants.js +75 -5
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +19 -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 +1 -1
- package/dist/lib/transformers/Components.js +8 -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 +62 -20
- 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 +9 -3
- package/dist/lib/types/gateway-events.d.ts +59 -1
- package/dist/lib/types/lobby.d.ts +36 -1
- package/dist/lib/types/message.d.ts +29 -1
- package/dist/package.json +4 -3
- package/package.json +5 -4
package/dist/lib/constants.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
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.UnfurledMediaItemFlags = 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.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.SearchSortModes = exports.SearchEmbedTypes = exports.SearchHasTypes = exports.AuthorTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedMediaFlags = exports.EmbedFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = void 0;
|
|
5
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = void 0;
|
|
5
6
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
7
|
var TimestampStyles;
|
|
7
8
|
(function (TimestampStyles) {
|
|
@@ -181,6 +182,11 @@ var SeparatorSpacing;
|
|
|
181
182
|
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
|
182
183
|
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
|
183
184
|
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
|
185
|
+
/** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
|
|
186
|
+
var UnfurledMediaItemFlags;
|
|
187
|
+
(function (UnfurledMediaItemFlags) {
|
|
188
|
+
UnfurledMediaItemFlags[UnfurledMediaItemFlags["IsAnimated"] = 1] = "IsAnimated";
|
|
189
|
+
})(UnfurledMediaItemFlags || (exports.UnfurledMediaItemFlags = UnfurledMediaItemFlags = {}));
|
|
184
190
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
185
191
|
var ApplicationIntegrationTypes;
|
|
186
192
|
(function (ApplicationIntegrationTypes) {
|
|
@@ -296,6 +302,8 @@ var AuditLogEvents;
|
|
|
296
302
|
AuditLogEvents[AuditLogEvents["OnboardingUpdate"] = 167] = "OnboardingUpdate";
|
|
297
303
|
AuditLogEvents[AuditLogEvents["HomeSettingsCreate"] = 190] = "HomeSettingsCreate";
|
|
298
304
|
AuditLogEvents[AuditLogEvents["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate";
|
|
305
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusUpdate"] = 192] = "VoiceChannelStatusUpdate";
|
|
306
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusDelete"] = 193] = "VoiceChannelStatusDelete";
|
|
299
307
|
})(AuditLogEvents || (exports.AuditLogEvents = AuditLogEvents = {}));
|
|
300
308
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
301
309
|
var TriggerTypes;
|
|
@@ -678,10 +686,24 @@ var EmbedTypes;
|
|
|
678
686
|
EmbedTypes["Link"] = "link";
|
|
679
687
|
EmbedTypes["PollResult"] = "poll_result";
|
|
680
688
|
})(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
|
|
689
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
|
|
690
|
+
var EmbedFlags;
|
|
691
|
+
(function (EmbedFlags) {
|
|
692
|
+
EmbedFlags[EmbedFlags["IsContentInventoryEntry"] = 32] = "IsContentInventoryEntry";
|
|
693
|
+
})(EmbedFlags || (exports.EmbedFlags = EmbedFlags = {}));
|
|
694
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
|
|
695
|
+
var EmbedMediaFlags;
|
|
696
|
+
(function (EmbedMediaFlags) {
|
|
697
|
+
EmbedMediaFlags[EmbedMediaFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
698
|
+
})(EmbedMediaFlags || (exports.EmbedMediaFlags = EmbedMediaFlags = {}));
|
|
681
699
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
|
682
700
|
var AttachmentFlags;
|
|
683
701
|
(function (AttachmentFlags) {
|
|
702
|
+
AttachmentFlags[AttachmentFlags["IsClip"] = 1] = "IsClip";
|
|
703
|
+
AttachmentFlags[AttachmentFlags["IsThumbnail"] = 2] = "IsThumbnail";
|
|
684
704
|
AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
|
|
705
|
+
AttachmentFlags[AttachmentFlags["IsSpoiler"] = 8] = "IsSpoiler";
|
|
706
|
+
AttachmentFlags[AttachmentFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
685
707
|
})(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
|
|
686
708
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
|
|
687
709
|
var AllowedMentionTypes;
|
|
@@ -693,11 +715,47 @@ var AllowedMentionTypes;
|
|
|
693
715
|
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
694
716
|
var BaseThemeTypes;
|
|
695
717
|
(function (BaseThemeTypes) {
|
|
718
|
+
BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
|
|
696
719
|
BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
|
|
697
720
|
BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
|
|
698
721
|
BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
|
|
699
722
|
BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
|
|
700
723
|
})(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
|
|
724
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
|
|
725
|
+
var AuthorTypes;
|
|
726
|
+
(function (AuthorTypes) {
|
|
727
|
+
AuthorTypes["User"] = "user";
|
|
728
|
+
AuthorTypes["Bot"] = "bot";
|
|
729
|
+
AuthorTypes["Webhook"] = "webhook";
|
|
730
|
+
})(AuthorTypes || (exports.AuthorTypes = AuthorTypes = {}));
|
|
731
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
|
|
732
|
+
var SearchHasTypes;
|
|
733
|
+
(function (SearchHasTypes) {
|
|
734
|
+
SearchHasTypes["Image"] = "image";
|
|
735
|
+
SearchHasTypes["Sound"] = "sound";
|
|
736
|
+
SearchHasTypes["Video"] = "video";
|
|
737
|
+
SearchHasTypes["File"] = "file";
|
|
738
|
+
SearchHasTypes["Sticker"] = "sticker";
|
|
739
|
+
SearchHasTypes["Embed"] = "embed";
|
|
740
|
+
SearchHasTypes["Link"] = "link";
|
|
741
|
+
SearchHasTypes["Poll"] = "poll";
|
|
742
|
+
SearchHasTypes["Snapshot"] = "snapshot";
|
|
743
|
+
})(SearchHasTypes || (exports.SearchHasTypes = SearchHasTypes = {}));
|
|
744
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
|
|
745
|
+
var SearchEmbedTypes;
|
|
746
|
+
(function (SearchEmbedTypes) {
|
|
747
|
+
SearchEmbedTypes["Image"] = "image";
|
|
748
|
+
SearchEmbedTypes["Video"] = "video";
|
|
749
|
+
SearchEmbedTypes["GIF"] = "gif";
|
|
750
|
+
SearchEmbedTypes["Sound"] = "sound";
|
|
751
|
+
SearchEmbedTypes["Article"] = "article";
|
|
752
|
+
})(SearchEmbedTypes || (exports.SearchEmbedTypes = SearchEmbedTypes = {}));
|
|
753
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
|
|
754
|
+
var SearchSortModes;
|
|
755
|
+
(function (SearchSortModes) {
|
|
756
|
+
SearchSortModes["Timestamp"] = "timestamp";
|
|
757
|
+
SearchSortModes["Relevance"] = "relevance";
|
|
758
|
+
})(SearchSortModes || (exports.SearchSortModes = SearchSortModes = {}));
|
|
701
759
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
702
760
|
var ReactionTypes;
|
|
703
761
|
(function (ReactionTypes) {
|
|
@@ -796,8 +854,8 @@ var VisibilityTypes;
|
|
|
796
854
|
var SubscriptionStatuses;
|
|
797
855
|
(function (SubscriptionStatuses) {
|
|
798
856
|
SubscriptionStatuses[SubscriptionStatuses["Active"] = 0] = "Active";
|
|
799
|
-
SubscriptionStatuses[SubscriptionStatuses["
|
|
800
|
-
SubscriptionStatuses[SubscriptionStatuses["
|
|
857
|
+
SubscriptionStatuses[SubscriptionStatuses["Inactive"] = 1] = "Inactive";
|
|
858
|
+
SubscriptionStatuses[SubscriptionStatuses["Ending"] = 2] = "Ending";
|
|
801
859
|
})(SubscriptionStatuses || (exports.SubscriptionStatuses = SubscriptionStatuses = {}));
|
|
802
860
|
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
|
|
803
861
|
var WebhookTypes;
|
|
@@ -864,6 +922,7 @@ var GatewayEvents;
|
|
|
864
922
|
GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
|
865
923
|
GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
|
866
924
|
GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
|
925
|
+
GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
|
|
867
926
|
GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
|
868
927
|
GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
|
|
869
928
|
GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
|
@@ -924,6 +983,8 @@ var GatewayEvents;
|
|
|
924
983
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
|
925
984
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
|
926
985
|
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
|
986
|
+
GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
|
|
987
|
+
GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
|
|
927
988
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
|
928
989
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
|
929
990
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
|
@@ -980,6 +1041,7 @@ var OAuth2Scopes;
|
|
|
980
1041
|
OAuth2Scopes["GuildsJoin"] = "guilds.join";
|
|
981
1042
|
OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
|
|
982
1043
|
OAuth2Scopes["Identify"] = "identify";
|
|
1044
|
+
OAuth2Scopes["IdentifyPremium"] = "identify.premium";
|
|
983
1045
|
OAuth2Scopes["MessagesRead"] = "messages.read";
|
|
984
1046
|
OAuth2Scopes["RelationShipsRead"] = "relationships.read";
|
|
985
1047
|
OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
|
|
@@ -1006,6 +1068,7 @@ var GatewayOPCodes;
|
|
|
1006
1068
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
|
1007
1069
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
|
1008
1070
|
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
|
1071
|
+
GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
|
|
1009
1072
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
|
1010
1073
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
1011
1074
|
var GatewayCloseEventCodes;
|
|
@@ -1130,8 +1193,8 @@ var JSONErrorCodes;
|
|
|
1130
1193
|
JSONErrorCodes[JSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
|
|
1131
1194
|
JSONErrorCodes[JSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
|
|
1132
1195
|
JSONErrorCodes[JSONErrorCodes["NotAuthorizedToPerformThisActionOnThisApplication"] = 20012] = "NotAuthorizedToPerformThisActionOnThisApplication";
|
|
1196
|
+
JSONErrorCodes[JSONErrorCodes["ThisActionRequiresAPremiumSubscription"] = 20015] = "ThisActionRequiresAPremiumSubscription";
|
|
1133
1197
|
JSONErrorCodes[JSONErrorCodes["ActionCannotBePerformedDueToSlowmodeRateLimit"] = 20016] = "ActionCannotBePerformedDueToSlowmodeRateLimit";
|
|
1134
|
-
JSONErrorCodes[JSONErrorCodes["TheMazeIsntMeantForYou"] = 20017] = "TheMazeIsntMeantForYou";
|
|
1135
1198
|
JSONErrorCodes[JSONErrorCodes["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction";
|
|
1136
1199
|
JSONErrorCodes[JSONErrorCodes["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded";
|
|
1137
1200
|
JSONErrorCodes[JSONErrorCodes["UnderMinimumAge"] = 20024] = "UnderMinimumAge";
|
|
@@ -1263,13 +1326,17 @@ var JSONErrorCodes;
|
|
|
1263
1326
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
|
|
1264
1327
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesCannotBeEdited"] = 50162] = "VoiceMessagesCannotBeEdited";
|
|
1265
1328
|
JSONErrorCodes[JSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
|
|
1329
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed"] = 50167] = "CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed";
|
|
1266
1330
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1267
1331
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1268
1332
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
1333
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
1269
1334
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
1270
1335
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
1271
1336
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
1272
1337
|
JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
1338
|
+
JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
1339
|
+
JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
1273
1340
|
JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
1274
1341
|
JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
1275
1342
|
JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -1278,6 +1345,7 @@ var JSONErrorCodes;
|
|
|
1278
1345
|
JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
1279
1346
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
1280
1347
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
1348
|
+
JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
|
|
1281
1349
|
JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
1282
1350
|
JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
1283
1351
|
JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -1294,6 +1362,7 @@ var JSONErrorCodes;
|
|
|
1294
1362
|
JSONErrorCodes[JSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels";
|
|
1295
1363
|
JSONErrorCodes[JSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels";
|
|
1296
1364
|
JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
|
|
1365
|
+
JSONErrorCodes[JSONErrorCodes["AccessToJoiningNewServersHasBeenLimitedForTheUser"] = 340015] = "AccessToJoiningNewServersHasBeenLimitedForTheUser";
|
|
1297
1366
|
JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
|
|
1298
1367
|
JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
|
|
1299
1368
|
JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
|
|
@@ -1385,6 +1454,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1385
1454
|
CreateEvents: 1n << 44n,
|
|
1386
1455
|
UseExternalSounds: 1n << 45n,
|
|
1387
1456
|
SendVoiceMessages: 1n << 46n,
|
|
1457
|
+
SetVoiceChannelStatus: 1n << 48n,
|
|
1388
1458
|
SendPolls: 1n << 49n,
|
|
1389
1459
|
UseExternalApps: 1n << 50n,
|
|
1390
1460
|
PinMessages: 1n << 51n,
|
|
@@ -4,7 +4,7 @@ import type { RawAuditLogEntry } from "../types/audit-log";
|
|
|
4
4
|
import type { RawAutoModerationRule } from "../types/auto-moderation";
|
|
5
5
|
import type { RawChannel, RawThreadMember } from "../types/channel";
|
|
6
6
|
import type { RawEntitlement } from "../types/entitlements";
|
|
7
|
-
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent } from "../types/gateway-events";
|
|
7
|
+
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent, RawChannelInfoEvent, RawVoiceChannelStatusUpdateEvent, RawVoiceChannelStartTimeUpdateEvent } from "../types/gateway-events";
|
|
8
8
|
import type { RawGuild, RawUnavailableGuild, RawGuildMember, RawIntegration } from "../types/guild";
|
|
9
9
|
import type { RawGuildScheduledEvent } from "../types/guild-scheduled-event";
|
|
10
10
|
import type { RawInteraction } from "../types/interaction";
|
|
@@ -36,6 +36,7 @@ export interface DispatchEvents {
|
|
|
36
36
|
[GatewayEvents.ChannelCreate]: RawChannel;
|
|
37
37
|
[GatewayEvents.ChannelUpdate]: RawChannel;
|
|
38
38
|
[GatewayEvents.ChannelDelete]: RawChannel;
|
|
39
|
+
[GatewayEvents.ChannelInfo]: RawChannelInfoEvent;
|
|
39
40
|
[GatewayEvents.ChannelPinsUpdate]: RawChannelPinsUpdateEvent;
|
|
40
41
|
[GatewayEvents.ThreadCreate]: RawChannel;
|
|
41
42
|
[GatewayEvents.ThreadUpdate]: RawChannel;
|
|
@@ -96,6 +97,8 @@ export interface DispatchEvents {
|
|
|
96
97
|
[GatewayEvents.TypingStart]: RawTypingStartEvent;
|
|
97
98
|
[GatewayEvents.UserUpdate]: RawUser;
|
|
98
99
|
[GatewayEvents.VoiceChannelEffectSend]: RawVoiceChannelEffectSendEvent;
|
|
100
|
+
[GatewayEvents.VoiceChannelStatusUpdate]: RawVoiceChannelStatusUpdateEvent;
|
|
101
|
+
[GatewayEvents.VoiceChannelStartTimeUpdate]: RawVoiceChannelStartTimeUpdateEvent;
|
|
99
102
|
[GatewayEvents.VoiceStateUpdate]: RawVoiceState;
|
|
100
103
|
[GatewayEvents.VoiceServerUpdate]: RawVoiceServerUpdateEvent;
|
|
101
104
|
[GatewayEvents.WebhooksUpdate]: RawWebhooksUpdateEvent;
|
|
@@ -67,6 +67,14 @@ exports.Handlers = {
|
|
|
67
67
|
[constants_1.GatewayEvents.ChannelCreate]: (shard, data) => shard.client.emit("channelCreate", transformers_1.Channels.channelFromRaw(data)),
|
|
68
68
|
[constants_1.GatewayEvents.ChannelUpdate]: (shard, data) => shard.client.emit("channelUpdate", transformers_1.Channels.channelFromRaw(data)),
|
|
69
69
|
[constants_1.GatewayEvents.ChannelDelete]: (shard, data) => shard.client.emit("channelDelete", transformers_1.Channels.channelFromRaw(data)),
|
|
70
|
+
[constants_1.GatewayEvents.ChannelInfo]: (shard, data) => shard.client.emit("channelInfo", {
|
|
71
|
+
guildId: data.guild_id,
|
|
72
|
+
channels: data.channels.map((channel) => ({
|
|
73
|
+
id: channel.id,
|
|
74
|
+
status: channel.status,
|
|
75
|
+
voiceStartTime: channel.voice_start_time,
|
|
76
|
+
})),
|
|
77
|
+
}),
|
|
70
78
|
[constants_1.GatewayEvents.ChannelPinsUpdate]: (shard, data) => shard.client.emit("channelPinsUpdate", {
|
|
71
79
|
guildId: data.guild_id,
|
|
72
80
|
channelId: data.channel_id,
|
|
@@ -329,6 +337,7 @@ exports.Handlers = {
|
|
|
329
337
|
? transformers_1.Guilds.guildMemberFromRaw(data.member)
|
|
330
338
|
: undefined,
|
|
331
339
|
mentions: data.mentions.map((mention) => transformers_1.Users.userFromRaw(mention)),
|
|
340
|
+
channelType: data.channel_type,
|
|
332
341
|
});
|
|
333
342
|
},
|
|
334
343
|
[constants_1.GatewayEvents.MessageUpdate]: (shard, data) => {
|
|
@@ -432,6 +441,16 @@ exports.Handlers = {
|
|
|
432
441
|
soundVolume: data.sound_volume,
|
|
433
442
|
});
|
|
434
443
|
},
|
|
444
|
+
[constants_1.GatewayEvents.VoiceChannelStatusUpdate]: (shard, data) => shard.client.emit("voiceChannelStatusUpdate", {
|
|
445
|
+
id: data.id,
|
|
446
|
+
guildId: data.guild_id,
|
|
447
|
+
status: data.status,
|
|
448
|
+
}),
|
|
449
|
+
[constants_1.GatewayEvents.VoiceChannelStartTimeUpdate]: (shard, data) => shard.client.emit("voiceChannelStartTimeUpdate", {
|
|
450
|
+
id: data.id,
|
|
451
|
+
guildId: data.guild_id,
|
|
452
|
+
voiceStartTime: data.voice_start_time,
|
|
453
|
+
}),
|
|
435
454
|
[constants_1.GatewayEvents.VoiceStateUpdate]: (shard, data) => {
|
|
436
455
|
shard.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(data));
|
|
437
456
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from "ws";
|
|
2
2
|
import { GatewayOPCodes } from "../constants";
|
|
3
|
-
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
3
|
+
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestChannelInfo, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
4
4
|
export declare class Transmitter {
|
|
5
5
|
private ws;
|
|
6
6
|
constructor(ws: WebSocket | null);
|
|
@@ -13,6 +13,8 @@ export declare class Transmitter {
|
|
|
13
13
|
requestGuildMembers(options: RequestGuildMembers): void;
|
|
14
14
|
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
15
15
|
requestSoundboardSounds(options: RequestSoundboardSounds): void;
|
|
16
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
17
|
+
requestChannelInfo(options: RequestChannelInfo): void;
|
|
16
18
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
17
19
|
resume(options: Resume): void;
|
|
18
20
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
@@ -56,6 +56,13 @@ class Transmitter {
|
|
|
56
56
|
guild_ids: options.guildIds,
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
60
|
+
requestChannelInfo(options) {
|
|
61
|
+
this.send(constants_1.GatewayOPCodes.RequestChannelInfo, {
|
|
62
|
+
guild_id: options.guildId,
|
|
63
|
+
fields: options.fields
|
|
64
|
+
});
|
|
65
|
+
}
|
|
59
66
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
60
67
|
resume(options) {
|
|
61
68
|
this.send(constants_1.GatewayOPCodes.Resume, {
|
|
@@ -22,6 +22,7 @@ export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake,
|
|
|
22
22
|
export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
|
|
23
23
|
export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
|
|
24
24
|
export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
|
|
25
|
+
export declare const guildMessagesSearch: (guildId: snowflake) => `guilds/${string}/messages/search`;
|
|
25
26
|
export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
|
|
26
27
|
export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
|
|
27
28
|
export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
|
|
@@ -59,13 +60,14 @@ export declare const channelPermission: (channelId: snowflake, overwriteId: snow
|
|
|
59
60
|
export declare const channelPin: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/pins/${string}`;
|
|
60
61
|
export declare const channelPins: (channelId: snowflake) => `channels/${string}/messages/pins`;
|
|
61
62
|
export declare const channelRecipient: (channelId: snowflake, userId: snowflake) => `channels/${string}/recipients/${string}`;
|
|
62
|
-
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/
|
|
63
|
+
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/public` | `channels/${string}/threads/archived/private`;
|
|
63
64
|
export declare const channelTyping: (channelId: snowflake) => `channels/${string}/typing`;
|
|
64
65
|
export declare const channelWebhooks: (channelId: snowflake) => `channels/${string}/webhooks`;
|
|
65
66
|
export declare const threads: (channelId: snowflake, messageId?: snowflake) => `channels/${string}/threads`;
|
|
66
67
|
export declare const threadMembers: (threadId: snowflake, userId?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
|
67
68
|
export declare const pollAnswerVoters: (channelId: snowflake, messageId: snowflake, answerId: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
|
68
69
|
export declare const pollExpire: (channelId: snowflake, messageId: snowflake) => `channels/${string}/polls/${string}/expire`;
|
|
70
|
+
export declare const channelVoiceStatus: (channelId: snowflake) => `channels/${string}/voice-status`;
|
|
69
71
|
export declare const user: (userId?: snowflake | "@me") => `users/${string}`;
|
|
70
72
|
export declare const userApplicationRoleConnection: (applicationId: snowflake) => `users/@me/applications/${string}/role-connection`;
|
|
71
73
|
export declare const userChannels: () => "users/@me/channels";
|
|
@@ -111,7 +113,11 @@ export declare const sticker: (stickerId: snowflake) => `stickers/${string}`;
|
|
|
111
113
|
export declare const voiceRegions: () => "voice/regions";
|
|
112
114
|
export declare const lobbies: () => "lobbies";
|
|
113
115
|
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
116
|
+
export declare const lobbyMessages: (lobbyId: snowflake) => `lobbies/${string}/messages`;
|
|
114
117
|
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
118
|
+
export declare const lobbyChannelInvite: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}/invites`;
|
|
115
119
|
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|
|
120
|
+
export declare const lobbyMembersBulk: (lobbyId: snowflake) => `lobbies/${string}/members/bulk`;
|
|
121
|
+
export declare const lobbyMessageModerationMetadata: (lobbyId: snowflake, messageId: snowflake) => `lobbies/${string}/messages/${string}/moderation-metadata`;
|
|
116
122
|
export declare const inviteTargetUsers: (inviteCode: string) => `invites/${string}/target-users`;
|
|
117
123
|
export declare const inviteTargetUsersJobStatus: (inviteCode: string) => `invites/${string}/target-users/job-status`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = void 0;
|
|
3
|
+
exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMessagesSearch = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
|
4
|
+
exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.channelVoiceStatus = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = void 0;
|
|
5
|
+
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyMessageModerationMetadata = exports.lobbyMembersBulk = exports.lobbyChannelLinking = exports.lobbyChannelInvite = exports.lobbyMember = exports.lobbyMessages = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = void 0;
|
|
6
6
|
// Guilds
|
|
7
7
|
const guild = (guildId) => `guilds/${guildId}`;
|
|
8
8
|
exports.guild = guild;
|
|
@@ -50,6 +50,8 @@ const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
|
|
|
50
50
|
exports.guildMembersSearch = guildMembersSearch;
|
|
51
51
|
const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
|
|
52
52
|
exports.guildMemberVerification = guildMemberVerification;
|
|
53
|
+
const guildMessagesSearch = (guildId) => `guilds/${guildId}/messages/search`;
|
|
54
|
+
exports.guildMessagesSearch = guildMessagesSearch;
|
|
53
55
|
const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
|
|
54
56
|
exports.guildOnboarding = guildOnboarding;
|
|
55
57
|
const guildPreview = (guildId) => `guilds/${guildId}/preview`;
|
|
@@ -147,6 +149,8 @@ const pollAnswerVoters = (channelId, messageId, answerId) => `channels/${channel
|
|
|
147
149
|
exports.pollAnswerVoters = pollAnswerVoters;
|
|
148
150
|
const pollExpire = (channelId, messageId) => `channels/${channelId}/polls/${messageId}/expire`;
|
|
149
151
|
exports.pollExpire = pollExpire;
|
|
152
|
+
const channelVoiceStatus = (channelId) => `channels/${channelId}/voice-status`;
|
|
153
|
+
exports.channelVoiceStatus = channelVoiceStatus;
|
|
150
154
|
// Users
|
|
151
155
|
const user = (userId = "@me") => `users/${userId}`;
|
|
152
156
|
exports.user = user;
|
|
@@ -249,10 +253,18 @@ const lobbies = () => "lobbies";
|
|
|
249
253
|
exports.lobbies = lobbies;
|
|
250
254
|
const lobby = (lobbyId) => `lobbies/${lobbyId}`;
|
|
251
255
|
exports.lobby = lobby;
|
|
256
|
+
const lobbyMessages = (lobbyId) => `lobbies/${lobbyId}/messages`;
|
|
257
|
+
exports.lobbyMessages = lobbyMessages;
|
|
252
258
|
const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}`;
|
|
253
259
|
exports.lobbyMember = lobbyMember;
|
|
260
|
+
const lobbyChannelInvite = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}/invites`;
|
|
261
|
+
exports.lobbyChannelInvite = lobbyChannelInvite;
|
|
254
262
|
const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
|
|
255
263
|
exports.lobbyChannelLinking = lobbyChannelLinking;
|
|
264
|
+
const lobbyMembersBulk = (lobbyId) => `lobbies/${lobbyId}/members/bulk`;
|
|
265
|
+
exports.lobbyMembersBulk = lobbyMembersBulk;
|
|
266
|
+
const lobbyMessageModerationMetadata = (lobbyId, messageId) => `lobbies/${lobbyId}/messages/${messageId}/moderation-metadata`;
|
|
267
|
+
exports.lobbyMessageModerationMetadata = lobbyMessageModerationMetadata;
|
|
256
268
|
// Invites
|
|
257
269
|
const inviteTargetUsers = (inviteCode) => `invites/${inviteCode}/target-users`;
|
|
258
270
|
exports.inviteTargetUsers = inviteTargetUsers;
|
|
@@ -123,9 +123,8 @@ class RequestManager {
|
|
|
123
123
|
resolve(null);
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
resolve(blob);
|
|
126
|
+
if (data?.returnsBlob) {
|
|
127
|
+
resolve((await response.blob));
|
|
129
128
|
}
|
|
130
129
|
resolve((await response.json()));
|
|
131
130
|
}
|
|
@@ -29,6 +29,7 @@ class Applications {
|
|
|
29
29
|
slug: application.slug,
|
|
30
30
|
coverImage: application.cover_image,
|
|
31
31
|
flags: application.flags,
|
|
32
|
+
flagsNew: application.flags_new,
|
|
32
33
|
approximateGuildCount: application.approximate_guild_count,
|
|
33
34
|
approximateUserInstallCount: application.approximate_user_install_count,
|
|
34
35
|
approximateUserAuthorizationCount: application.approximate_user_authorization_count,
|
|
@@ -79,6 +80,7 @@ class Applications {
|
|
|
79
80
|
slug: application.slug,
|
|
80
81
|
cover_image: application.coverImage,
|
|
81
82
|
flags: application.flags,
|
|
83
|
+
flags_new: application.flagsNew,
|
|
82
84
|
approximate_guild_count: application.approximateGuildCount,
|
|
83
85
|
approximate_user_install_count: application.approximateUserInstallCount,
|
|
84
86
|
approximate_user_authorization_count: application.approximateUserAuthorizationCount,
|
|
@@ -34,6 +34,7 @@ class AuditLogs {
|
|
|
34
34
|
roleName: auditLogEntry.options.role_name,
|
|
35
35
|
type: auditLogEntry.options.type,
|
|
36
36
|
integrationType: auditLogEntry.options.integration_type,
|
|
37
|
+
status: auditLogEntry.options.status
|
|
37
38
|
}
|
|
38
39
|
: undefined,
|
|
39
40
|
reason: auditLogEntry.reason,
|
|
@@ -64,6 +65,7 @@ class AuditLogs {
|
|
|
64
65
|
role_name: auditLogEntry.options.roleName,
|
|
65
66
|
type: auditLogEntry.options.type,
|
|
66
67
|
integration_type: auditLogEntry.options.integrationType,
|
|
68
|
+
status: auditLogEntry.options.status
|
|
67
69
|
}
|
|
68
70
|
: undefined,
|
|
69
71
|
reason: auditLogEntry.reason,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
1
|
+
import type { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
2
2
|
export declare class Components {
|
|
3
3
|
static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
|
|
4
4
|
static actionRowToRaw(actionRow: ActionRow): RawActionRow;
|
|
@@ -584,7 +584,11 @@ class Components {
|
|
|
584
584
|
proxyURL: unfurledMediaItem.proxy_url,
|
|
585
585
|
height: unfurledMediaItem.height,
|
|
586
586
|
width: unfurledMediaItem.width,
|
|
587
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
588
|
+
placeholderVersion: unfurledMediaItem.placeholder_version,
|
|
587
589
|
contentType: unfurledMediaItem.content_type,
|
|
590
|
+
flags: unfurledMediaItem.flags,
|
|
591
|
+
attachmentId: unfurledMediaItem.attachment_id,
|
|
588
592
|
};
|
|
589
593
|
}
|
|
590
594
|
static unfurledMediaItemToRaw(unfurledMediaItem) {
|
|
@@ -593,7 +597,11 @@ class Components {
|
|
|
593
597
|
proxy_url: unfurledMediaItem.proxyURL,
|
|
594
598
|
height: unfurledMediaItem.height,
|
|
595
599
|
width: unfurledMediaItem.width,
|
|
600
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
601
|
+
placeholder_version: unfurledMediaItem.placeholderVersion,
|
|
596
602
|
content_type: unfurledMediaItem.contentType,
|
|
603
|
+
flags: unfurledMediaItem.flags,
|
|
604
|
+
attachment_id: unfurledMediaItem.attachmentId,
|
|
597
605
|
};
|
|
598
606
|
}
|
|
599
607
|
static userSelectFromRaw(userSelect) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Lobby, LobbyMember, RawLobby, RawLobbyMember } from "../types/lobby";
|
|
1
|
+
import type { Lobby, LobbyMember, LobbyMessage, RawLobby, RawLobbyMember, RawLobbyMessage } from "../types/lobby";
|
|
2
2
|
export declare class Lobbies {
|
|
3
3
|
static lobbyFromRaw(lobby: RawLobby): Lobby;
|
|
4
4
|
static lobbyMemberFromRaw(lobbyMember: RawLobbyMember): LobbyMember;
|
|
5
5
|
static lobbyMemberToRaw(lobbyMember: LobbyMember): RawLobbyMember;
|
|
6
|
+
static lobbyMessageFromRaw(lobbyMessage: RawLobbyMessage): LobbyMessage;
|
|
7
|
+
static lobbyMessageToRaw(lobbyMessage: LobbyMessage): RawLobbyMessage;
|
|
6
8
|
static lobbyToRaw(lobby: Lobby): RawLobby;
|
|
7
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Lobbies = void 0;
|
|
4
|
+
const Users_1 = require("./Users");
|
|
4
5
|
class Lobbies {
|
|
5
6
|
static lobbyFromRaw(lobby) {
|
|
6
7
|
return {
|
|
@@ -25,6 +26,34 @@ class Lobbies {
|
|
|
25
26
|
flags: lobbyMember.flags,
|
|
26
27
|
};
|
|
27
28
|
}
|
|
29
|
+
static lobbyMessageFromRaw(lobbyMessage) {
|
|
30
|
+
return {
|
|
31
|
+
id: lobbyMessage.id,
|
|
32
|
+
type: lobbyMessage.type,
|
|
33
|
+
content: lobbyMessage.content,
|
|
34
|
+
lobbyId: lobbyMessage.lobby_id,
|
|
35
|
+
channelId: lobbyMessage.channel_id,
|
|
36
|
+
author: Users_1.Users.userFromRaw(lobbyMessage.author),
|
|
37
|
+
metadata: lobbyMessage.metadata,
|
|
38
|
+
moderationMetadata: lobbyMessage.moderation_metadata,
|
|
39
|
+
flags: lobbyMessage.flags,
|
|
40
|
+
applicationId: lobbyMessage.application_id,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static lobbyMessageToRaw(lobbyMessage) {
|
|
44
|
+
return {
|
|
45
|
+
id: lobbyMessage.id,
|
|
46
|
+
type: lobbyMessage.type,
|
|
47
|
+
content: lobbyMessage.content,
|
|
48
|
+
lobby_id: lobbyMessage.lobbyId,
|
|
49
|
+
channel_id: lobbyMessage.channelId,
|
|
50
|
+
author: Users_1.Users.userToRaw(lobbyMessage.author),
|
|
51
|
+
metadata: lobbyMessage.metadata,
|
|
52
|
+
moderation_metadata: lobbyMessage.moderationMetadata,
|
|
53
|
+
flags: lobbyMessage.flags,
|
|
54
|
+
application_id: lobbyMessage.applicationId,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
28
57
|
static lobbyToRaw(lobby) {
|
|
29
58
|
return {
|
|
30
59
|
id: lobby.id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
1
|
+
import type { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
2
2
|
import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "../types/components";
|
|
3
3
|
export declare class Messages {
|
|
4
4
|
static attachmentFromRaw(attachment: RawAttachment): Attachment;
|