disgroove 3.0.1-dev.739a5a9 → 3.0.1-dev.a547862

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +38 -8
  3. package/dist/lib/Client.d.ts +78 -4
  4. package/dist/lib/Client.js +110 -1
  5. package/dist/lib/constants.d.ts +78 -5
  6. package/dist/lib/constants.js +84 -2
  7. package/dist/lib/gateway/Dispatcher.d.ts +4 -1
  8. package/dist/lib/gateway/Dispatcher.js +25 -0
  9. package/dist/lib/gateway/Transmitter.d.ts +3 -1
  10. package/dist/lib/gateway/Transmitter.js +7 -0
  11. package/dist/lib/rest/Endpoints.d.ts +7 -1
  12. package/dist/lib/rest/Endpoints.js +15 -3
  13. package/dist/lib/rest/RequestManager.d.ts +1 -0
  14. package/dist/lib/rest/RequestManager.js +2 -3
  15. package/dist/lib/transformers/Applications.js +2 -0
  16. package/dist/lib/transformers/AuditLogs.js +2 -0
  17. package/dist/lib/transformers/Components.d.ts +7 -1
  18. package/dist/lib/transformers/Components.js +80 -0
  19. package/dist/lib/transformers/Guilds.js +10 -0
  20. package/dist/lib/transformers/Interactions.js +46 -0
  21. package/dist/lib/transformers/Invites.d.ts +3 -0
  22. package/dist/lib/transformers/Invites.js +32 -0
  23. package/dist/lib/transformers/Lobbies.d.ts +3 -1
  24. package/dist/lib/transformers/Lobbies.js +29 -0
  25. package/dist/lib/transformers/Messages.d.ts +1 -1
  26. package/dist/lib/transformers/Messages.js +78 -20
  27. package/dist/lib/transformers/Users.d.ts +3 -1
  28. package/dist/lib/transformers/Users.js +16 -10
  29. package/dist/lib/types/application.d.ts +4 -2
  30. package/dist/lib/types/audit-log.d.ts +2 -0
  31. package/dist/lib/types/components.d.ts +133 -7
  32. package/dist/lib/types/gateway-events.d.ts +64 -2
  33. package/dist/lib/types/guild.d.ts +3 -1
  34. package/dist/lib/types/invite.d.ts +2 -2
  35. package/dist/lib/types/lobby.d.ts +36 -1
  36. package/dist/lib/types/message.d.ts +66 -1
  37. package/dist/package.json +4 -3
  38. package/package.json +5 -4
@@ -1,7 +1,8 @@
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.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.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
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) {
@@ -155,6 +156,9 @@ var ComponentTypes;
155
156
  ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
156
157
  ComponentTypes[ComponentTypes["Label"] = 18] = "Label";
157
158
  ComponentTypes[ComponentTypes["FileUpload"] = 19] = "FileUpload";
159
+ ComponentTypes[ComponentTypes["RadioGroup"] = 21] = "RadioGroup";
160
+ ComponentTypes[ComponentTypes["CheckboxGroup"] = 22] = "CheckboxGroup";
161
+ ComponentTypes[ComponentTypes["Checkbox"] = 23] = "Checkbox";
158
162
  })(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
159
163
  /** https://discord.com/developers/docs/components/reference#button-button-styles */
160
164
  var ButtonStyles;
@@ -178,6 +182,11 @@ var SeparatorSpacing;
178
182
  SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
179
183
  SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
180
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 = {}));
181
190
  /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
182
191
  var ApplicationIntegrationTypes;
183
192
  (function (ApplicationIntegrationTypes) {
@@ -293,6 +302,8 @@ var AuditLogEvents;
293
302
  AuditLogEvents[AuditLogEvents["OnboardingUpdate"] = 167] = "OnboardingUpdate";
294
303
  AuditLogEvents[AuditLogEvents["HomeSettingsCreate"] = 190] = "HomeSettingsCreate";
295
304
  AuditLogEvents[AuditLogEvents["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate";
305
+ AuditLogEvents[AuditLogEvents["VoiceChannelStatusUpdate"] = 192] = "VoiceChannelStatusUpdate";
306
+ AuditLogEvents[AuditLogEvents["VoiceChannelStatusDelete"] = 193] = "VoiceChannelStatusDelete";
296
307
  })(AuditLogEvents || (exports.AuditLogEvents = AuditLogEvents = {}));
297
308
  /** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
298
309
  var TriggerTypes;
@@ -675,10 +686,24 @@ var EmbedTypes;
675
686
  EmbedTypes["Link"] = "link";
676
687
  EmbedTypes["PollResult"] = "poll_result";
677
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 = {}));
678
699
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
679
700
  var AttachmentFlags;
680
701
  (function (AttachmentFlags) {
702
+ AttachmentFlags[AttachmentFlags["IsClip"] = 1] = "IsClip";
703
+ AttachmentFlags[AttachmentFlags["IsThumbnail"] = 2] = "IsThumbnail";
681
704
  AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
705
+ AttachmentFlags[AttachmentFlags["IsSpoiler"] = 8] = "IsSpoiler";
706
+ AttachmentFlags[AttachmentFlags["IsAnimated"] = 32] = "IsAnimated";
682
707
  })(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
683
708
  /** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
684
709
  var AllowedMentionTypes;
@@ -687,6 +712,50 @@ var AllowedMentionTypes;
687
712
  AllowedMentionTypes["UserMentions"] = "users";
688
713
  AllowedMentionTypes["EveryoneMentions"] = "everyone";
689
714
  })(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
715
+ /** https://docs.discord.com/developers/resources/message#base-theme-types */
716
+ var BaseThemeTypes;
717
+ (function (BaseThemeTypes) {
718
+ BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
719
+ BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
720
+ BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
721
+ BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
722
+ BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
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 = {}));
690
759
  /** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
691
760
  var ReactionTypes;
692
761
  (function (ReactionTypes) {
@@ -853,6 +922,7 @@ var GatewayEvents;
853
922
  GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
854
923
  GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
855
924
  GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
925
+ GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
856
926
  GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
857
927
  GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
858
928
  GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
@@ -913,6 +983,8 @@ var GatewayEvents;
913
983
  GatewayEvents["TypingStart"] = "TYPING_START";
914
984
  GatewayEvents["UserUpdate"] = "USER_UPDATE";
915
985
  GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
986
+ GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
987
+ GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
916
988
  GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
917
989
  GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
918
990
  GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
@@ -969,6 +1041,7 @@ var OAuth2Scopes;
969
1041
  OAuth2Scopes["GuildsJoin"] = "guilds.join";
970
1042
  OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
971
1043
  OAuth2Scopes["Identify"] = "identify";
1044
+ OAuth2Scopes["IdentifyPremium"] = "identify.premium";
972
1045
  OAuth2Scopes["MessagesRead"] = "messages.read";
973
1046
  OAuth2Scopes["RelationShipsRead"] = "relationships.read";
974
1047
  OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
@@ -995,6 +1068,7 @@ var GatewayOPCodes;
995
1068
  GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
996
1069
  GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
997
1070
  GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
1071
+ GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
998
1072
  })(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
999
1073
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
1000
1074
  var GatewayCloseEventCodes;
@@ -1044,7 +1118,10 @@ var VoiceCloseEventCodes;
1044
1118
  VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
1045
1119
  VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
1046
1120
  VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
1121
+ VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
1047
1122
  VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
1123
+ VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
1124
+ VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
1048
1125
  })(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
1049
1126
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
1050
1127
  var HTTPResponseCodes;
@@ -1252,10 +1329,13 @@ var JSONErrorCodes;
1252
1329
  JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
1253
1330
  JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
1254
1331
  JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
1332
+ JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
1255
1333
  JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
1256
1334
  JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
1257
1335
  JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
1258
1336
  JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
1337
+ JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
1338
+ JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
1259
1339
  JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
1260
1340
  JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
1261
1341
  JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
@@ -1264,6 +1344,7 @@ var JSONErrorCodes;
1264
1344
  JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
1265
1345
  JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
1266
1346
  JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
1347
+ JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
1267
1348
  JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
1268
1349
  JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
1269
1350
  JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
@@ -1371,6 +1452,7 @@ exports.BitwisePermissionFlags = {
1371
1452
  CreateEvents: 1n << 44n,
1372
1453
  UseExternalSounds: 1n << 45n,
1373
1454
  SendVoiceMessages: 1n << 46n,
1455
+ SetVoiceChannelStatus: 1n << 48n,
1374
1456
  SendPolls: 1n << 49n,
1375
1457
  UseExternalApps: 1n << 50n,
1376
1458
  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,
@@ -208,6 +216,11 @@ exports.Handlers = {
208
216
  }
209
217
  : null
210
218
  : undefined,
219
+ collectibles: data.collectibles !== undefined
220
+ ? data.collectibles !== null
221
+ ? transformers_1.Users.collectiblesFromRaw(data.collectibles)
222
+ : null
223
+ : undefined,
211
224
  });
212
225
  },
213
226
  [constants_1.GatewayEvents.GuildMembersChunk]: (shard, data) => {
@@ -306,6 +319,7 @@ exports.Handlers = {
306
319
  temporary: data.temporary,
307
320
  uses: data.uses,
308
321
  expiresAt: data.expires_at,
322
+ roleIds: data.roles_ids,
309
323
  });
310
324
  },
311
325
  [constants_1.GatewayEvents.InviteDelete]: (shard, data) => {
@@ -323,6 +337,7 @@ exports.Handlers = {
323
337
  ? transformers_1.Guilds.guildMemberFromRaw(data.member)
324
338
  : undefined,
325
339
  mentions: data.mentions.map((mention) => transformers_1.Users.userFromRaw(mention)),
340
+ channelType: data.channel_type,
326
341
  });
327
342
  },
328
343
  [constants_1.GatewayEvents.MessageUpdate]: (shard, data) => {
@@ -426,6 +441,16 @@ exports.Handlers = {
426
441
  soundVolume: data.sound_volume,
427
442
  });
428
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
+ }),
429
454
  [constants_1.GatewayEvents.VoiceStateUpdate]: (shard, data) => {
430
455
  shard.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(data));
431
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/private` | `channels/${string}/threads/archived/public`;
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.channelFollowers = 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.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.oauth2Authorize = exports.gatewayBot = 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.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 = void 0;
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;
@@ -13,6 +13,7 @@ export interface RequestData {
13
13
  reason?: string;
14
14
  query?: Record<string, any>;
15
15
  authorization?: boolean;
16
+ returnsBlob?: boolean;
16
17
  }
17
18
  /** https://discord.com/developers/docs/reference#error-messages */
18
19
  export interface ErrorResponse {
@@ -123,9 +123,8 @@ class RequestManager {
123
123
  resolve(null);
124
124
  }
125
125
  else {
126
- let blob = await response.blob();
127
- if (blob) {
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 } 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;
@@ -6,6 +6,10 @@ export declare class Components {
6
6
  static buttonToRaw(button: Button): RawButton;
7
7
  static channelSelectFromRaw(channelSelect: RawChannelSelect): ChannelSelect;
8
8
  static channelSelectToRaw(channelSelect: ChannelSelect): RawChannelSelect;
9
+ static checkboxFromRaw(checkbox: RawCheckbox): Checkbox;
10
+ static checkboxToRaw(checkbox: Checkbox): RawCheckbox;
11
+ static checkboxGroupFromRaw(checkboxGroup: RawCheckboxGroup): CheckboxGroup;
12
+ static checkboxGroupToRaw(checkboxGroup: CheckboxGroup): RawCheckboxGroup;
9
13
  static containerFromRaw(container: RawContainer): Container;
10
14
  static containerToRaw(container: Container): RawContainer;
11
15
  static fileFromRaw(file: RawFile): File;
@@ -18,6 +22,8 @@ export declare class Components {
18
22
  static mediaGalleryToRaw(mediaGallery: MediaGallery): RawMediaGallery;
19
23
  static mentionableSelectFromRaw(mentionableSelect: RawMentionableSelect): MentionableSelect;
20
24
  static mentionableSelectToRaw(mentionableSelect: MentionableSelect): RawMentionableSelect;
25
+ static radioGroupFromRaw(radioGroup: RawRadioGroup): RadioGroup;
26
+ static radioGroupToRaw(radioGroup: RadioGroup): RawRadioGroup;
21
27
  static roleSelectFromRaw(roleSelect: RawRoleSelect): RoleSelect;
22
28
  static roleSelectToRaw(roleSelect: RoleSelect): RawRoleSelect;
23
29
  static sectionFromRaw(section: RawSection): Section;
@@ -103,6 +103,44 @@ class Components {
103
103
  disabled: channelSelect.disabled,
104
104
  };
105
105
  }
106
+ static checkboxFromRaw(checkbox) {
107
+ return {
108
+ type: checkbox.type,
109
+ id: checkbox.id,
110
+ customId: checkbox.custom_id,
111
+ default: checkbox.default,
112
+ };
113
+ }
114
+ static checkboxToRaw(checkbox) {
115
+ return {
116
+ type: checkbox.type,
117
+ id: checkbox.id,
118
+ custom_id: checkbox.customId,
119
+ default: checkbox.default,
120
+ };
121
+ }
122
+ static checkboxGroupFromRaw(checkboxGroup) {
123
+ return {
124
+ type: checkboxGroup.type,
125
+ id: checkboxGroup.id,
126
+ customId: checkboxGroup.custom_id,
127
+ options: checkboxGroup.options,
128
+ minValues: checkboxGroup.min_values,
129
+ maxValues: checkboxGroup.max_values,
130
+ required: checkboxGroup.required,
131
+ };
132
+ }
133
+ static checkboxGroupToRaw(checkboxGroup) {
134
+ return {
135
+ type: checkboxGroup.type,
136
+ id: checkboxGroup.id,
137
+ custom_id: checkboxGroup.customId,
138
+ options: checkboxGroup.options,
139
+ min_values: checkboxGroup.minValues,
140
+ max_values: checkboxGroup.maxValues,
141
+ required: checkboxGroup.required,
142
+ };
143
+ }
106
144
  static containerFromRaw(container) {
107
145
  return {
108
146
  type: container.type,
@@ -227,6 +265,14 @@ class Components {
227
265
  case constants_1.ComponentTypes.FileUpload:
228
266
  component = Components.fileUploadFromRaw(label.component);
229
267
  break;
268
+ case constants_1.ComponentTypes.RadioGroup:
269
+ component = Components.radioGroupFromRaw(label.component);
270
+ break;
271
+ case constants_1.ComponentTypes.CheckboxGroup:
272
+ component = Components.checkboxGroupFromRaw(label.component);
273
+ break;
274
+ case constants_1.ComponentTypes.Checkbox:
275
+ component = Components.checkboxFromRaw(label.component);
230
276
  }
231
277
  return {
232
278
  type: label.type,
@@ -260,6 +306,14 @@ class Components {
260
306
  case constants_1.ComponentTypes.FileUpload:
261
307
  component = Components.fileUploadToRaw(label.component);
262
308
  break;
309
+ case constants_1.ComponentTypes.RadioGroup:
310
+ component = Components.radioGroupToRaw(label.component);
311
+ break;
312
+ case constants_1.ComponentTypes.CheckboxGroup:
313
+ component = Components.checkboxGroupToRaw(label.component);
314
+ break;
315
+ case constants_1.ComponentTypes.Checkbox:
316
+ component = Components.checkboxToRaw(label.component);
263
317
  }
264
318
  return {
265
319
  type: label.type,
@@ -315,6 +369,24 @@ class Components {
315
369
  disabled: mentionableSelect.disabled,
316
370
  };
317
371
  }
372
+ static radioGroupFromRaw(radioGroup) {
373
+ return {
374
+ type: radioGroup.type,
375
+ id: radioGroup.id,
376
+ customId: radioGroup.custom_id,
377
+ options: radioGroup.options,
378
+ required: radioGroup.required,
379
+ };
380
+ }
381
+ static radioGroupToRaw(radioGroup) {
382
+ return {
383
+ type: radioGroup.type,
384
+ id: radioGroup.id,
385
+ custom_id: radioGroup.customId,
386
+ options: radioGroup.options,
387
+ required: radioGroup.required,
388
+ };
389
+ }
318
390
  static roleSelectFromRaw(roleSelect) {
319
391
  return {
320
392
  type: roleSelect.type,
@@ -512,7 +584,11 @@ class Components {
512
584
  proxyURL: unfurledMediaItem.proxy_url,
513
585
  height: unfurledMediaItem.height,
514
586
  width: unfurledMediaItem.width,
587
+ placeholder: unfurledMediaItem.placeholder,
588
+ placeholderVersion: unfurledMediaItem.placeholder_version,
515
589
  contentType: unfurledMediaItem.content_type,
590
+ flags: unfurledMediaItem.flags,
591
+ attachmentId: unfurledMediaItem.attachment_id,
516
592
  };
517
593
  }
518
594
  static unfurledMediaItemToRaw(unfurledMediaItem) {
@@ -521,7 +597,11 @@ class Components {
521
597
  proxy_url: unfurledMediaItem.proxyURL,
522
598
  height: unfurledMediaItem.height,
523
599
  width: unfurledMediaItem.width,
600
+ placeholder: unfurledMediaItem.placeholder,
601
+ placeholder_version: unfurledMediaItem.placeholderVersion,
524
602
  content_type: unfurledMediaItem.contentType,
603
+ flags: unfurledMediaItem.flags,
604
+ attachment_id: unfurledMediaItem.attachmentId,
525
605
  };
526
606
  }
527
607
  static userSelectFromRaw(userSelect) {