disgroove 3.0.1-dev.6e60c8d → 3.0.1-dev.7231e6e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/dist/lib/Client.d.ts +95 -11
  3. package/dist/lib/Client.js +133 -23
  4. package/dist/lib/constants.d.ts +89 -9
  5. package/dist/lib/constants.js +95 -5
  6. package/dist/lib/gateway/Dispatcher.d.ts +4 -1
  7. package/dist/lib/gateway/Dispatcher.js +25 -1
  8. package/dist/lib/gateway/Shard.js +1 -0
  9. package/dist/lib/gateway/Transmitter.d.ts +3 -1
  10. package/dist/lib/gateway/Transmitter.js +8 -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/ApplicationCommands.js +2 -0
  16. package/dist/lib/transformers/Applications.js +2 -0
  17. package/dist/lib/transformers/AuditLogs.js +2 -0
  18. package/dist/lib/transformers/Channels.d.ts +3 -0
  19. package/dist/lib/transformers/Channels.js +24 -0
  20. package/dist/lib/transformers/Components.d.ts +1 -1
  21. package/dist/lib/transformers/Components.js +10 -0
  22. package/dist/lib/transformers/Guilds.js +10 -0
  23. package/dist/lib/transformers/Lobbies.d.ts +3 -1
  24. package/dist/lib/transformers/Lobbies.js +31 -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-command.d.ts +2 -0
  30. package/dist/lib/types/application.d.ts +4 -2
  31. package/dist/lib/types/audit-log.d.ts +2 -0
  32. package/dist/lib/types/channel.d.ts +4 -2
  33. package/dist/lib/types/components.d.ts +11 -3
  34. package/dist/lib/types/gateway-events.d.ts +66 -2
  35. package/dist/lib/types/guild.d.ts +3 -1
  36. package/dist/lib/types/lobby.d.ts +38 -1
  37. package/dist/lib/types/message.d.ts +86 -1
  38. package/dist/package.json +4 -3
  39. package/package.json +5 -4
@@ -162,6 +162,10 @@ export declare enum SeparatorSpacing {
162
162
  Small = 1,
163
163
  Large = 2
164
164
  }
165
+ /** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
166
+ export declare enum UnfurledMediaItemFlags {
167
+ IsAnimated = 1
168
+ }
165
169
  /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
166
170
  export declare enum ApplicationIntegrationTypes {
167
171
  GuildInstall = 0,
@@ -270,7 +274,9 @@ export declare enum AuditLogEvents {
270
274
  OnboardingCreate = 166,
271
275
  OnboardingUpdate = 167,
272
276
  HomeSettingsCreate = 190,
273
- HomeSettingsUpdate = 191
277
+ HomeSettingsUpdate = 191,
278
+ VoiceChannelStatusUpdate = 192,
279
+ VoiceChannelStatusDelete = 193
274
280
  }
275
281
  /** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
276
282
  export declare enum TriggerTypes {
@@ -323,7 +329,9 @@ export declare enum VideoQualityModes {
323
329
  export declare enum ChannelFlags {
324
330
  Pinned = 2,
325
331
  RequiredTag = 16,
326
- HideMediaDownloadOptions = 32768
332
+ HideMediaDownloadOptions = 32768,
333
+ ChannelObfuscated = 131072,
334
+ IsSpoilerChannel = 2097152
327
335
  }
328
336
  /** https://discord.com/developers/docs/resources/channel#channel-object-sort-order-types */
329
337
  export declare enum SortOrderTypes {
@@ -581,7 +589,8 @@ export declare enum MessageActivityTypes {
581
589
  Join = 1,
582
590
  Spectate = 2,
583
591
  Listen = 3,
584
- JoinRequest = 5
592
+ JoinRequest = 5,
593
+ StreamRequest = 6
585
594
  }
586
595
  /** https://discord.com/developers/docs/resources/message#message-object-message-flags */
587
596
  export declare enum MessageFlags {
@@ -614,9 +623,21 @@ export declare enum EmbedTypes {
614
623
  Link = "link",
615
624
  PollResult = "poll_result"
616
625
  }
626
+ /** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
627
+ export declare enum EmbedFlags {
628
+ IsContentInventoryEntry = 32
629
+ }
630
+ /** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
631
+ export declare enum EmbedMediaFlags {
632
+ IsAnimated = 32
633
+ }
617
634
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
618
635
  export declare enum AttachmentFlags {
619
- IsRemix = 4
636
+ IsClip = 1,
637
+ IsThumbnail = 2,
638
+ IsRemix = 4,
639
+ IsSpoiler = 8,
640
+ IsAnimated = 32
620
641
  }
621
642
  /** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
622
643
  export declare enum AllowedMentionTypes {
@@ -624,6 +645,45 @@ export declare enum AllowedMentionTypes {
624
645
  UserMentions = "users",
625
646
  EveryoneMentions = "everyone"
626
647
  }
648
+ /** https://docs.discord.com/developers/resources/message#base-theme-types */
649
+ export declare enum BaseThemeTypes {
650
+ Unset = 0,
651
+ Dark = 1,
652
+ Light = 2,
653
+ Darker = 3,
654
+ Midnight = 4
655
+ }
656
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
657
+ export declare enum AuthorTypes {
658
+ User = "user",
659
+ Bot = "bot",
660
+ Webhook = "webhook"
661
+ }
662
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
663
+ export declare enum SearchHasTypes {
664
+ Image = "image",
665
+ Sound = "sound",
666
+ Video = "video",
667
+ File = "file",
668
+ Sticker = "sticker",
669
+ Embed = "embed",
670
+ Link = "link",
671
+ Poll = "poll",
672
+ Snapshot = "snapshot"
673
+ }
674
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
675
+ export declare enum SearchEmbedTypes {
676
+ Image = "image",
677
+ Video = "video",
678
+ GIF = "gif",
679
+ Sound = "sound",
680
+ Article = "article"
681
+ }
682
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
683
+ export declare enum SearchSortModes {
684
+ Timestamp = "timestamp",
685
+ Relevance = "relevance"
686
+ }
627
687
  /** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
628
688
  export declare enum ReactionTypes {
629
689
  Normal = 0,
@@ -712,8 +772,8 @@ export declare enum VisibilityTypes {
712
772
  /** https://discord.com/developers/docs/resources/subscription#subscription-statuses */
713
773
  export declare enum SubscriptionStatuses {
714
774
  Active = 0,
715
- Ending = 1,
716
- Inactive = 2
775
+ Inactive = 1,
776
+ Ending = 2
717
777
  }
718
778
  /** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
719
779
  export declare enum WebhookTypes {
@@ -762,6 +822,10 @@ export declare enum StatusTypes {
762
822
  Invisible = "invisible",
763
823
  Offline = "offline"
764
824
  }
825
+ /** https://docs.discord.com/developers/events/gateway-events#identify-gateway-capabilities */
826
+ export declare enum GatewayCapabilities {
827
+ ChannelObfuscation = 32768
828
+ }
765
829
  /** https://discord.com/developers/docs/topics/gateway-events#receive-events */
766
830
  export declare enum GatewayEvents {
767
831
  Ready = "READY",
@@ -775,6 +839,7 @@ export declare enum GatewayEvents {
775
839
  ChannelCreate = "CHANNEL_CREATE",
776
840
  ChannelUpdate = "CHANNEL_UPDATE",
777
841
  ChannelDelete = "CHANNEL_DELETE",
842
+ ChannelInfo = "CHANNEL_INFO",
778
843
  ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
779
844
  ThreadCreate = "THREAD_CREATE",
780
845
  ThreadUpdate = "THREAD_UPDATE",
@@ -835,6 +900,8 @@ export declare enum GatewayEvents {
835
900
  TypingStart = "TYPING_START",
836
901
  UserUpdate = "USER_UPDATE",
837
902
  VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
903
+ VoiceChannelStartTimeUpdate = "VOICE_CHANNEL_START_TIME_UPDATE",
904
+ VoiceChannelStatusUpdate = "VOICE_CHANNEL_STATUS_UPDATE",
838
905
  VoiceStateUpdate = "VOICE_STATE_UPDATE",
839
906
  VoiceServerUpdate = "VOICE_SERVER_UPDATE",
840
907
  WebhooksUpdate = "WEBHOOKS_UPDATE",
@@ -887,6 +954,7 @@ export declare enum OAuth2Scopes {
887
954
  GuildsJoin = "guilds.join",
888
955
  GuildsMembersRead = "guilds.members.read",
889
956
  Identify = "identify",
957
+ IdentifyPremium = "identify.premium",
890
958
  MessagesRead = "messages.read",
891
959
  RelationShipsRead = "relationships.read",
892
960
  RoleConnectionsWrite = "role_connections.write",
@@ -911,7 +979,8 @@ export declare enum GatewayOPCodes {
911
979
  InvalidSession = 9,
912
980
  Hello = 10,
913
981
  HeartbeatACK = 11,
914
- RequestSoundboardSounds = 31
982
+ RequestSoundboardSounds = 31,
983
+ RequestChannelInfo = 43
915
984
  }
916
985
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
917
986
  export declare enum GatewayCloseEventCodes {
@@ -958,7 +1027,10 @@ export declare enum VoiceCloseEventCodes {
958
1027
  Disconnect = 4014,
959
1028
  VoiceServerCrashed = 4015,
960
1029
  UnknownEncryptionMode = 4016,
961
- BadRequest = 4020
1030
+ ProtocolRequired = 4017,
1031
+ BadRequest = 4020,
1032
+ RateLimited = 4021,
1033
+ CallTerminated = 4022
962
1034
  }
963
1035
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
964
1036
  export declare enum HTTPResponseCodes {
@@ -1028,8 +1100,8 @@ export declare enum JSONErrorCodes {
1028
1100
  OnlyBotsCanUseThisEndpoint = 20002,
1029
1101
  ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
1030
1102
  NotAuthorizedToPerformThisActionOnThisApplication = 20012,
1103
+ ThisActionRequiresAPremiumSubscription = 20015,
1031
1104
  ActionCannotBePerformedDueToSlowmodeRateLimit = 20016,
1032
- TheMazeIsntMeantForYou = 20017,
1033
1105
  OnlyTheOwnerOfThisAccountCanPerformThisAction = 20018,
1034
1106
  AnnouncementEditLimitExceeded = 20022,
1035
1107
  UnderMinimumAge = 20024,
@@ -1078,6 +1150,7 @@ export declare enum JSONErrorCodes {
1078
1150
  RequestEntityTooLarge = 40005,
1079
1151
  FeatureTemporarilyDisabledServerSide = 40006,
1080
1152
  UserBannedFromThisGuild = 40007,
1153
+ OnlyOneChannelCanHaveAParentIdModifiedAtATime = 40009,
1081
1154
  ConnectionHasBeenRevoked = 40012,
1082
1155
  OnlyConsumableSKUsCanBeConsumed = 40018,
1083
1156
  YouCanOnlyDeleteSandboxEntitlements = 40019,
@@ -1161,13 +1234,17 @@ export declare enum JSONErrorCodes {
1161
1234
  VoiceMessagesMustHaveSupportingMetadata = 50161,
1162
1235
  VoiceMessagesCannotBeEdited = 50162,
1163
1236
  CannotDeleteGuildSubscriptionIntegration = 50163,
1237
+ CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed = 50167,
1164
1238
  YouCannotSendVoiceMessagesInThisChannel = 50173,
1165
1239
  TheUserAccountMustFirstBeVerified = 50178,
1166
1240
  TheProvidedFileDoesNotHaveAValidDuration = 50192,
1241
+ CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50278,
1167
1242
  YouDoNotHavePermissionToSendThisSticker = 50600,
1168
1243
  TwoFactorAuthenticationIsRequired = 60003,
1169
1244
  NoUsersWithDiscordTagExist = 80004,
1170
1245
  ReactionWasBlocked = 90001,
1246
+ UserCannotUseBurstReactions = 90002,
1247
+ IndexNotYetAvailable = 110000,
1171
1248
  ApplicationNotYetAvailable = 110001,
1172
1249
  APIResourceOverloaded = 130000,
1173
1250
  TheStageIsAlreadyOpen = 150006,
@@ -1176,6 +1253,7 @@ export declare enum JSONErrorCodes {
1176
1253
  ThreadLocked = 160005,
1177
1254
  MaximumActiveThreads = 160006,
1178
1255
  MaximumActiveAnnouncementThreads = 160007,
1256
+ YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
1179
1257
  InvalidJSONForUploadedLottieFile = 170001,
1180
1258
  UploadedLottiesCannotContainRasterizedImages = 170002,
1181
1259
  StickerMaximumFramerateExceeded = 170003,
@@ -1192,6 +1270,7 @@ export declare enum JSONErrorCodes {
1192
1270
  WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
1193
1271
  WebhookServicesCannotBeUsedInForumChannels = 220004,
1194
1272
  MessageBlockedByHarmfulLinksFilter = 240000,
1273
+ AccessToJoiningNewServersHasBeenLimitedForTheUser = 340015,
1195
1274
  CannotEnableOnboardingRequirementsAreNotMet = 350000,
1196
1275
  CannotUpdateOnboardingWhileBelowRequirements = 350001,
1197
1276
  AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
@@ -1281,6 +1360,7 @@ export declare const BitwisePermissionFlags: {
1281
1360
  readonly CreateEvents: bigint;
1282
1361
  readonly UseExternalSounds: bigint;
1283
1362
  readonly SendVoiceMessages: bigint;
1363
+ readonly SetVoiceChannelStatus: bigint;
1284
1364
  readonly SendPolls: bigint;
1285
1365
  readonly UseExternalApps: bigint;
1286
1366
  readonly PinMessages: bigint;
@@ -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.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.GatewayCapabilities = 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 = exports.TeamMemberRoleTypes = 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;
@@ -356,6 +364,8 @@ var ChannelFlags;
356
364
  ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned";
357
365
  ChannelFlags[ChannelFlags["RequiredTag"] = 16] = "RequiredTag";
358
366
  ChannelFlags[ChannelFlags["HideMediaDownloadOptions"] = 32768] = "HideMediaDownloadOptions";
367
+ ChannelFlags[ChannelFlags["ChannelObfuscated"] = 131072] = "ChannelObfuscated";
368
+ ChannelFlags[ChannelFlags["IsSpoilerChannel"] = 2097152] = "IsSpoilerChannel";
359
369
  })(ChannelFlags || (exports.ChannelFlags = ChannelFlags = {}));
360
370
  /** https://discord.com/developers/docs/resources/channel#channel-object-sort-order-types */
361
371
  var SortOrderTypes;
@@ -643,6 +653,7 @@ var MessageActivityTypes;
643
653
  MessageActivityTypes[MessageActivityTypes["Spectate"] = 2] = "Spectate";
644
654
  MessageActivityTypes[MessageActivityTypes["Listen"] = 3] = "Listen";
645
655
  MessageActivityTypes[MessageActivityTypes["JoinRequest"] = 5] = "JoinRequest";
656
+ MessageActivityTypes[MessageActivityTypes["StreamRequest"] = 6] = "StreamRequest";
646
657
  })(MessageActivityTypes || (exports.MessageActivityTypes = MessageActivityTypes = {}));
647
658
  /** https://discord.com/developers/docs/resources/message#message-object-message-flags */
648
659
  var MessageFlags;
@@ -678,10 +689,24 @@ var EmbedTypes;
678
689
  EmbedTypes["Link"] = "link";
679
690
  EmbedTypes["PollResult"] = "poll_result";
680
691
  })(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
692
+ /** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
693
+ var EmbedFlags;
694
+ (function (EmbedFlags) {
695
+ EmbedFlags[EmbedFlags["IsContentInventoryEntry"] = 32] = "IsContentInventoryEntry";
696
+ })(EmbedFlags || (exports.EmbedFlags = EmbedFlags = {}));
697
+ /** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
698
+ var EmbedMediaFlags;
699
+ (function (EmbedMediaFlags) {
700
+ EmbedMediaFlags[EmbedMediaFlags["IsAnimated"] = 32] = "IsAnimated";
701
+ })(EmbedMediaFlags || (exports.EmbedMediaFlags = EmbedMediaFlags = {}));
681
702
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
682
703
  var AttachmentFlags;
683
704
  (function (AttachmentFlags) {
705
+ AttachmentFlags[AttachmentFlags["IsClip"] = 1] = "IsClip";
706
+ AttachmentFlags[AttachmentFlags["IsThumbnail"] = 2] = "IsThumbnail";
684
707
  AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
708
+ AttachmentFlags[AttachmentFlags["IsSpoiler"] = 8] = "IsSpoiler";
709
+ AttachmentFlags[AttachmentFlags["IsAnimated"] = 32] = "IsAnimated";
685
710
  })(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
686
711
  /** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
687
712
  var AllowedMentionTypes;
@@ -690,6 +715,50 @@ var AllowedMentionTypes;
690
715
  AllowedMentionTypes["UserMentions"] = "users";
691
716
  AllowedMentionTypes["EveryoneMentions"] = "everyone";
692
717
  })(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
718
+ /** https://docs.discord.com/developers/resources/message#base-theme-types */
719
+ var BaseThemeTypes;
720
+ (function (BaseThemeTypes) {
721
+ BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
722
+ BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
723
+ BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
724
+ BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
725
+ BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
726
+ })(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
727
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
728
+ var AuthorTypes;
729
+ (function (AuthorTypes) {
730
+ AuthorTypes["User"] = "user";
731
+ AuthorTypes["Bot"] = "bot";
732
+ AuthorTypes["Webhook"] = "webhook";
733
+ })(AuthorTypes || (exports.AuthorTypes = AuthorTypes = {}));
734
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
735
+ var SearchHasTypes;
736
+ (function (SearchHasTypes) {
737
+ SearchHasTypes["Image"] = "image";
738
+ SearchHasTypes["Sound"] = "sound";
739
+ SearchHasTypes["Video"] = "video";
740
+ SearchHasTypes["File"] = "file";
741
+ SearchHasTypes["Sticker"] = "sticker";
742
+ SearchHasTypes["Embed"] = "embed";
743
+ SearchHasTypes["Link"] = "link";
744
+ SearchHasTypes["Poll"] = "poll";
745
+ SearchHasTypes["Snapshot"] = "snapshot";
746
+ })(SearchHasTypes || (exports.SearchHasTypes = SearchHasTypes = {}));
747
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
748
+ var SearchEmbedTypes;
749
+ (function (SearchEmbedTypes) {
750
+ SearchEmbedTypes["Image"] = "image";
751
+ SearchEmbedTypes["Video"] = "video";
752
+ SearchEmbedTypes["GIF"] = "gif";
753
+ SearchEmbedTypes["Sound"] = "sound";
754
+ SearchEmbedTypes["Article"] = "article";
755
+ })(SearchEmbedTypes || (exports.SearchEmbedTypes = SearchEmbedTypes = {}));
756
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
757
+ var SearchSortModes;
758
+ (function (SearchSortModes) {
759
+ SearchSortModes["Timestamp"] = "timestamp";
760
+ SearchSortModes["Relevance"] = "relevance";
761
+ })(SearchSortModes || (exports.SearchSortModes = SearchSortModes = {}));
693
762
  /** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
694
763
  var ReactionTypes;
695
764
  (function (ReactionTypes) {
@@ -788,8 +857,8 @@ var VisibilityTypes;
788
857
  var SubscriptionStatuses;
789
858
  (function (SubscriptionStatuses) {
790
859
  SubscriptionStatuses[SubscriptionStatuses["Active"] = 0] = "Active";
791
- SubscriptionStatuses[SubscriptionStatuses["Ending"] = 1] = "Ending";
792
- SubscriptionStatuses[SubscriptionStatuses["Inactive"] = 2] = "Inactive";
860
+ SubscriptionStatuses[SubscriptionStatuses["Inactive"] = 1] = "Inactive";
861
+ SubscriptionStatuses[SubscriptionStatuses["Ending"] = 2] = "Ending";
793
862
  })(SubscriptionStatuses || (exports.SubscriptionStatuses = SubscriptionStatuses = {}));
794
863
  /** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
795
864
  var WebhookTypes;
@@ -842,6 +911,11 @@ var StatusTypes;
842
911
  StatusTypes["Invisible"] = "invisible";
843
912
  StatusTypes["Offline"] = "offline";
844
913
  })(StatusTypes || (exports.StatusTypes = StatusTypes = {}));
914
+ /** https://docs.discord.com/developers/events/gateway-events#identify-gateway-capabilities */
915
+ var GatewayCapabilities;
916
+ (function (GatewayCapabilities) {
917
+ GatewayCapabilities[GatewayCapabilities["ChannelObfuscation"] = 32768] = "ChannelObfuscation";
918
+ })(GatewayCapabilities || (exports.GatewayCapabilities = GatewayCapabilities = {}));
845
919
  /** https://discord.com/developers/docs/topics/gateway-events#receive-events */
846
920
  var GatewayEvents;
847
921
  (function (GatewayEvents) {
@@ -856,6 +930,7 @@ var GatewayEvents;
856
930
  GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
857
931
  GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
858
932
  GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
933
+ GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
859
934
  GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
860
935
  GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
861
936
  GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
@@ -916,6 +991,8 @@ var GatewayEvents;
916
991
  GatewayEvents["TypingStart"] = "TYPING_START";
917
992
  GatewayEvents["UserUpdate"] = "USER_UPDATE";
918
993
  GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
994
+ GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
995
+ GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
919
996
  GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
920
997
  GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
921
998
  GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
@@ -972,6 +1049,7 @@ var OAuth2Scopes;
972
1049
  OAuth2Scopes["GuildsJoin"] = "guilds.join";
973
1050
  OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
974
1051
  OAuth2Scopes["Identify"] = "identify";
1052
+ OAuth2Scopes["IdentifyPremium"] = "identify.premium";
975
1053
  OAuth2Scopes["MessagesRead"] = "messages.read";
976
1054
  OAuth2Scopes["RelationShipsRead"] = "relationships.read";
977
1055
  OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
@@ -998,6 +1076,7 @@ var GatewayOPCodes;
998
1076
  GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
999
1077
  GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
1000
1078
  GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
1079
+ GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
1001
1080
  })(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
1002
1081
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
1003
1082
  var GatewayCloseEventCodes;
@@ -1047,7 +1126,10 @@ var VoiceCloseEventCodes;
1047
1126
  VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
1048
1127
  VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
1049
1128
  VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
1129
+ VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
1050
1130
  VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
1131
+ VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
1132
+ VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
1051
1133
  })(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
1052
1134
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
1053
1135
  var HTTPResponseCodes;
@@ -1119,8 +1201,8 @@ var JSONErrorCodes;
1119
1201
  JSONErrorCodes[JSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
1120
1202
  JSONErrorCodes[JSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
1121
1203
  JSONErrorCodes[JSONErrorCodes["NotAuthorizedToPerformThisActionOnThisApplication"] = 20012] = "NotAuthorizedToPerformThisActionOnThisApplication";
1204
+ JSONErrorCodes[JSONErrorCodes["ThisActionRequiresAPremiumSubscription"] = 20015] = "ThisActionRequiresAPremiumSubscription";
1122
1205
  JSONErrorCodes[JSONErrorCodes["ActionCannotBePerformedDueToSlowmodeRateLimit"] = 20016] = "ActionCannotBePerformedDueToSlowmodeRateLimit";
1123
- JSONErrorCodes[JSONErrorCodes["TheMazeIsntMeantForYou"] = 20017] = "TheMazeIsntMeantForYou";
1124
1206
  JSONErrorCodes[JSONErrorCodes["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction";
1125
1207
  JSONErrorCodes[JSONErrorCodes["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded";
1126
1208
  JSONErrorCodes[JSONErrorCodes["UnderMinimumAge"] = 20024] = "UnderMinimumAge";
@@ -1169,6 +1251,7 @@ var JSONErrorCodes;
1169
1251
  JSONErrorCodes[JSONErrorCodes["RequestEntityTooLarge"] = 40005] = "RequestEntityTooLarge";
1170
1252
  JSONErrorCodes[JSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide";
1171
1253
  JSONErrorCodes[JSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild";
1254
+ JSONErrorCodes[JSONErrorCodes["OnlyOneChannelCanHaveAParentIdModifiedAtATime"] = 40009] = "OnlyOneChannelCanHaveAParentIdModifiedAtATime";
1172
1255
  JSONErrorCodes[JSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
1173
1256
  JSONErrorCodes[JSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed";
1174
1257
  JSONErrorCodes[JSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements";
@@ -1252,13 +1335,17 @@ var JSONErrorCodes;
1252
1335
  JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
1253
1336
  JSONErrorCodes[JSONErrorCodes["VoiceMessagesCannotBeEdited"] = 50162] = "VoiceMessagesCannotBeEdited";
1254
1337
  JSONErrorCodes[JSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
1338
+ JSONErrorCodes[JSONErrorCodes["CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed"] = 50167] = "CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed";
1255
1339
  JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
1256
1340
  JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
1257
1341
  JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
1342
+ JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
1258
1343
  JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
1259
1344
  JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
1260
1345
  JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
1261
1346
  JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
1347
+ JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
1348
+ JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
1262
1349
  JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
1263
1350
  JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
1264
1351
  JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
@@ -1267,6 +1354,7 @@ var JSONErrorCodes;
1267
1354
  JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
1268
1355
  JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
1269
1356
  JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
1357
+ JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
1270
1358
  JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
1271
1359
  JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
1272
1360
  JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
@@ -1283,6 +1371,7 @@ var JSONErrorCodes;
1283
1371
  JSONErrorCodes[JSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels";
1284
1372
  JSONErrorCodes[JSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels";
1285
1373
  JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
1374
+ JSONErrorCodes[JSONErrorCodes["AccessToJoiningNewServersHasBeenLimitedForTheUser"] = 340015] = "AccessToJoiningNewServersHasBeenLimitedForTheUser";
1286
1375
  JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
1287
1376
  JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
1288
1377
  JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
@@ -1374,6 +1463,7 @@ exports.BitwisePermissionFlags = {
1374
1463
  CreateEvents: 1n << 44n,
1375
1464
  UseExternalSounds: 1n << 45n,
1376
1465
  SendVoiceMessages: 1n << 46n,
1466
+ SetVoiceChannelStatus: 1n << 48n,
1377
1467
  SendPolls: 1n << 49n,
1378
1468
  UseExternalApps: 1n << 50n,
1379
1469
  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,7 +319,7 @@ exports.Handlers = {
306
319
  temporary: data.temporary,
307
320
  uses: data.uses,
308
321
  expiresAt: data.expires_at,
309
- roleIds: data.roles_ids
322
+ roleIds: data.roles_ids,
310
323
  });
311
324
  },
312
325
  [constants_1.GatewayEvents.InviteDelete]: (shard, data) => {
@@ -324,6 +337,7 @@ exports.Handlers = {
324
337
  ? transformers_1.Guilds.guildMemberFromRaw(data.member)
325
338
  : undefined,
326
339
  mentions: data.mentions.map((mention) => transformers_1.Users.userFromRaw(mention)),
340
+ channelType: data.channel_type,
327
341
  });
328
342
  },
329
343
  [constants_1.GatewayEvents.MessageUpdate]: (shard, data) => {
@@ -427,6 +441,16 @@ exports.Handlers = {
427
441
  soundVolume: data.sound_volume,
428
442
  });
429
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
+ }),
430
454
  [constants_1.GatewayEvents.VoiceStateUpdate]: (shard, data) => {
431
455
  shard.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(data));
432
456
  },
@@ -138,6 +138,7 @@ class Shard {
138
138
  }
139
139
  : undefined,
140
140
  intents: this.client.intents,
141
+ capabilities: this.client.capabilities,
141
142
  });
142
143
  }
143
144
  onWebSocketOpen() { }
@@ -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 */
@@ -37,6 +37,7 @@ class Transmitter {
37
37
  shard: options.shard,
38
38
  presence: options.presence,
39
39
  intents: options.intents,
40
+ capabilities: options.capabilities,
40
41
  });
41
42
  }
42
43
  /** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
@@ -56,6 +57,13 @@ class Transmitter {
56
57
  guild_ids: options.guildIds,
57
58
  });
58
59
  }
60
+ /** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
61
+ requestChannelInfo(options) {
62
+ this.send(constants_1.GatewayOPCodes.RequestChannelInfo, {
63
+ guild_id: options.guildId,
64
+ fields: options.fields,
65
+ });
66
+ }
59
67
  /** https://discord.com/developers/docs/topics/gateway-events#resume */
60
68
  resume(options) {
61
69
  this.send(constants_1.GatewayOPCodes.Resume, {