disgroove 2.2.7-dev.c6794e0 → 2.2.7-dev.ee0727b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/lib/Client.d.ts +49 -52
  2. package/dist/lib/Client.js +99 -62
  3. package/dist/lib/constants.d.ts +30 -21
  4. package/dist/lib/constants.js +34 -24
  5. package/dist/lib/gateway/Shard.js +15 -0
  6. package/dist/lib/index.d.ts +1 -1
  7. package/dist/lib/index.js +1 -1
  8. package/dist/lib/rest/Endpoints.d.ts +4 -0
  9. package/dist/lib/rest/Endpoints.js +10 -1
  10. package/dist/lib/rest/RequestManager.d.ts +1 -3
  11. package/dist/lib/transformers/Components.d.ts +13 -3
  12. package/dist/lib/transformers/Components.js +277 -150
  13. package/dist/lib/transformers/Interactions.js +283 -38
  14. package/dist/lib/transformers/Lobbies.d.ts +7 -0
  15. package/dist/lib/transformers/Lobbies.js +38 -0
  16. package/dist/lib/transformers/Messages.d.ts +4 -3
  17. package/dist/lib/transformers/Messages.js +20 -34
  18. package/dist/lib/transformers/Roles.js +2 -2
  19. package/dist/lib/transformers/index.d.ts +2 -1
  20. package/dist/lib/transformers/index.js +2 -1
  21. package/dist/lib/types/components.d.ts +450 -0
  22. package/dist/lib/types/components.js +2 -0
  23. package/dist/lib/types/gateway-events.d.ts +23 -1
  24. package/dist/lib/types/guild.d.ts +7 -5
  25. package/dist/lib/types/interaction.d.ts +12 -8
  26. package/dist/lib/types/invite.d.ts +2 -2
  27. package/dist/lib/types/lobby.d.ts +29 -0
  28. package/dist/lib/types/lobby.js +2 -0
  29. package/dist/lib/types/message-components.d.ts +334 -118
  30. package/dist/lib/types/message.d.ts +3 -5
  31. package/dist/lib/types/role.d.ts +2 -2
  32. package/dist/lib/utils/formatters.d.ts +1 -1
  33. package/dist/lib/utils/formatters.js +1 -1
  34. package/dist/package.json +1 -1
  35. package/package.json +1 -1
@@ -106,7 +106,19 @@ export declare enum InteractionContextTypes {
106
106
  BotDM = 1,
107
107
  PrivateChannel = 2
108
108
  }
109
- /** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
109
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
110
+ export declare enum InteractionCallbackType {
111
+ Pong = 1,
112
+ ChannelMessageWithSource = 4,
113
+ DeferredChannelMessageWithSource = 5,
114
+ DeferredUpdateMessage = 6,
115
+ UpdateMessage = 7,
116
+ ApplicationCommandAutocompleteResult = 8,
117
+ Modal = 9,
118
+ PremiumRequired = 10,
119
+ LaunchActivity = 12
120
+ }
121
+ /** https://discord.com/developers/docs/components/reference#component-object-component-types */
110
122
  export declare enum ComponentTypes {
111
123
  ActionRow = 1,
112
124
  Button = 2,
@@ -122,26 +134,10 @@ export declare enum ComponentTypes {
122
134
  MediaGallery = 12,
123
135
  File = 13,
124
136
  Separator = 14,
125
- Container = 17
137
+ Container = 17,
138
+ Label = 18
126
139
  }
127
- /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
128
- export declare enum SeparatorSpacing {
129
- Small = 1,
130
- Large = 2
131
- }
132
- /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
133
- export declare enum InteractionCallbackType {
134
- Pong = 1,
135
- ChannelMessageWithSource = 4,
136
- DeferredChannelMessageWithSource = 5,
137
- DeferredUpdateMessage = 6,
138
- UpdateMessage = 7,
139
- ApplicationCommandAutocompleteResult = 8,
140
- Modal = 9,
141
- PremiumRequired = 10,
142
- LaunchActivity = 12
143
- }
144
- /** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
140
+ /** https://discord.com/developers/docs/components/reference#button-button-styles */
145
141
  export declare enum ButtonStyles {
146
142
  Primary = 1,
147
143
  Secondary = 2,
@@ -150,11 +146,16 @@ export declare enum ButtonStyles {
150
146
  Link = 5,
151
147
  Premium = 6
152
148
  }
153
- /** https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles */
149
+ /** https://discord.com/developers/docs/components/reference#text-input-text-input-styles */
154
150
  export declare enum TextInputStyles {
155
151
  Short = 1,
156
152
  Paragraph = 2
157
153
  }
154
+ /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
155
+ export declare enum SeparatorSpacing {
156
+ Small = 1,
157
+ Large = 2
158
+ }
158
159
  /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
159
160
  export declare enum ApplicationIntegrationTypes {
160
161
  GuildInstall = 0,
@@ -408,6 +409,7 @@ export declare enum GuildFeatures {
408
409
  VipRegions = "VIP_REGIONS",
409
410
  WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED",
410
411
  GuestsEnabled = "GUESTS_ENABLED",
412
+ GuildTags = "GUILD_TAGS",
411
413
  EnhancedRoleColors = "ENHANCED_ROLE_COLORS"
412
414
  }
413
415
  /** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
@@ -517,6 +519,10 @@ export declare enum InviteTargetTypes {
517
519
  export declare enum GuildInviteFlags {
518
520
  IsGuestInvite = 1
519
521
  }
522
+ /** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-flags */
523
+ export declare enum LobbyMemberFlags {
524
+ CanLinkLobby = 1
525
+ }
520
526
  /** https://discord.com/developers/docs/resources/message#message-object-message-types */
521
527
  export declare enum MessageTypes {
522
528
  Default = 0,
@@ -747,6 +753,7 @@ export declare enum StatusTypes {
747
753
  export declare enum GatewayEvents {
748
754
  Ready = "READY",
749
755
  Resumed = "RESUMED",
756
+ RateLimited = "RATE_LIMITED",
750
757
  ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
751
758
  AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
752
759
  AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
@@ -1172,6 +1179,7 @@ export declare enum JSONErrorCodes {
1172
1179
  MessageBlockedByHarmfulLinksFilter = 240000,
1173
1180
  CannotEnableOnboardingRequirementsAreNotMet = 350000,
1174
1181
  CannotUpdateOnboardingWhileBelowRequirements = 350001,
1182
+ AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
1175
1183
  FailedToBanUsers = 500000,
1176
1184
  PollVotingBlocked = 520000,
1177
1185
  PollExpired = 520001,
@@ -1260,6 +1268,7 @@ export declare const BitwisePermissionFlags: {
1260
1268
  readonly SendVoiceMessages: bigint;
1261
1269
  readonly SendPolls: bigint;
1262
1270
  readonly UseExternalApps: bigint;
1271
+ readonly PinMessages: bigint;
1263
1272
  };
1264
1273
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1265
1274
  export declare enum RoleFlags {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.SeparatorSpacing = exports.ComponentTypes = 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.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
3
+ exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
4
+ exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
5
5
  /** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
6
6
  var TimestampStyles;
7
7
  (function (TimestampStyles) {
@@ -120,7 +120,20 @@ var InteractionContextTypes;
120
120
  InteractionContextTypes[InteractionContextTypes["BotDM"] = 1] = "BotDM";
121
121
  InteractionContextTypes[InteractionContextTypes["PrivateChannel"] = 2] = "PrivateChannel";
122
122
  })(InteractionContextTypes || (exports.InteractionContextTypes = InteractionContextTypes = {}));
123
- /** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
123
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
124
+ var InteractionCallbackType;
125
+ (function (InteractionCallbackType) {
126
+ InteractionCallbackType[InteractionCallbackType["Pong"] = 1] = "Pong";
127
+ InteractionCallbackType[InteractionCallbackType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
128
+ InteractionCallbackType[InteractionCallbackType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
129
+ InteractionCallbackType[InteractionCallbackType["DeferredUpdateMessage"] = 6] = "DeferredUpdateMessage";
130
+ InteractionCallbackType[InteractionCallbackType["UpdateMessage"] = 7] = "UpdateMessage";
131
+ InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
132
+ InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
133
+ InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
134
+ InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
135
+ })(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
136
+ /** https://discord.com/developers/docs/components/reference#component-object-component-types */
124
137
  var ComponentTypes;
125
138
  (function (ComponentTypes) {
126
139
  ComponentTypes[ComponentTypes["ActionRow"] = 1] = "ActionRow";
@@ -138,27 +151,9 @@ var ComponentTypes;
138
151
  ComponentTypes[ComponentTypes["File"] = 13] = "File";
139
152
  ComponentTypes[ComponentTypes["Separator"] = 14] = "Separator";
140
153
  ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
154
+ ComponentTypes[ComponentTypes["Label"] = 18] = "Label";
141
155
  })(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
142
- /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
143
- var SeparatorSpacing;
144
- (function (SeparatorSpacing) {
145
- SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
146
- SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
147
- })(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
148
- /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
149
- var InteractionCallbackType;
150
- (function (InteractionCallbackType) {
151
- InteractionCallbackType[InteractionCallbackType["Pong"] = 1] = "Pong";
152
- InteractionCallbackType[InteractionCallbackType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
153
- InteractionCallbackType[InteractionCallbackType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
154
- InteractionCallbackType[InteractionCallbackType["DeferredUpdateMessage"] = 6] = "DeferredUpdateMessage";
155
- InteractionCallbackType[InteractionCallbackType["UpdateMessage"] = 7] = "UpdateMessage";
156
- InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
157
- InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
158
- InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
159
- InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
160
- })(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
161
- /** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
156
+ /** https://discord.com/developers/docs/components/reference#button-button-styles */
162
157
  var ButtonStyles;
163
158
  (function (ButtonStyles) {
164
159
  ButtonStyles[ButtonStyles["Primary"] = 1] = "Primary";
@@ -168,12 +163,18 @@ var ButtonStyles;
168
163
  ButtonStyles[ButtonStyles["Link"] = 5] = "Link";
169
164
  ButtonStyles[ButtonStyles["Premium"] = 6] = "Premium";
170
165
  })(ButtonStyles || (exports.ButtonStyles = ButtonStyles = {}));
171
- /** https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles */
166
+ /** https://discord.com/developers/docs/components/reference#text-input-text-input-styles */
172
167
  var TextInputStyles;
173
168
  (function (TextInputStyles) {
174
169
  TextInputStyles[TextInputStyles["Short"] = 1] = "Short";
175
170
  TextInputStyles[TextInputStyles["Paragraph"] = 2] = "Paragraph";
176
171
  })(TextInputStyles || (exports.TextInputStyles = TextInputStyles = {}));
172
+ /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
173
+ var SeparatorSpacing;
174
+ (function (SeparatorSpacing) {
175
+ SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
176
+ SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
177
+ })(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
177
178
  /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
178
179
  var ApplicationIntegrationTypes;
179
180
  (function (ApplicationIntegrationTypes) {
@@ -450,6 +451,7 @@ var GuildFeatures;
450
451
  GuildFeatures["VipRegions"] = "VIP_REGIONS";
451
452
  GuildFeatures["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
452
453
  GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
454
+ GuildFeatures["GuildTags"] = "GUILD_TAGS";
453
455
  GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
454
456
  })(GuildFeatures || (exports.GuildFeatures = GuildFeatures = {}));
455
457
  /** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
@@ -574,6 +576,11 @@ var GuildInviteFlags;
574
576
  (function (GuildInviteFlags) {
575
577
  GuildInviteFlags[GuildInviteFlags["IsGuestInvite"] = 1] = "IsGuestInvite";
576
578
  })(GuildInviteFlags || (exports.GuildInviteFlags = GuildInviteFlags = {}));
579
+ /** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-flags */
580
+ var LobbyMemberFlags;
581
+ (function (LobbyMemberFlags) {
582
+ LobbyMemberFlags[LobbyMemberFlags["CanLinkLobby"] = 1] = "CanLinkLobby";
583
+ })(LobbyMemberFlags || (exports.LobbyMemberFlags = LobbyMemberFlags = {}));
577
584
  /** https://discord.com/developers/docs/resources/message#message-object-message-types */
578
585
  var MessageTypes;
579
586
  (function (MessageTypes) {
@@ -826,6 +833,7 @@ var GatewayEvents;
826
833
  (function (GatewayEvents) {
827
834
  GatewayEvents["Ready"] = "READY";
828
835
  GatewayEvents["Resumed"] = "RESUMED";
836
+ GatewayEvents["RateLimited"] = "RATE_LIMITED";
829
837
  GatewayEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
830
838
  GatewayEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
831
839
  GatewayEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
@@ -1261,6 +1269,7 @@ var JSONErrorCodes;
1261
1269
  JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
1262
1270
  JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
1263
1271
  JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
1272
+ JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
1264
1273
  JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
1265
1274
  JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
1266
1275
  JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
@@ -1351,6 +1360,7 @@ exports.BitwisePermissionFlags = {
1351
1360
  SendVoiceMessages: 1n << 46n,
1352
1361
  SendPolls: 1n << 49n,
1353
1362
  UseExternalApps: 1n << 50n,
1363
+ PinMessages: 1n << 51n,
1354
1364
  };
1355
1365
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1356
1366
  var RoleFlags;
@@ -102,6 +102,20 @@ class Shard {
102
102
  case constants_1.GatewayEvents.Resumed:
103
103
  this.client.emit("resumed");
104
104
  break;
105
+ case constants_1.GatewayEvents.RateLimited:
106
+ switch (packet.d.opcode) {
107
+ case constants_1.GatewayOPCodes.RequestGuildMembers: {
108
+ this.client.emit("rateLimited", {
109
+ opcode: constants_1.GatewayOPCodes.RequestGuildMembers,
110
+ retryAfter: packet.d.retry_after,
111
+ meta: {
112
+ guildID: packet.d.meta.guild_id,
113
+ nonce: packet.d.nonce,
114
+ },
115
+ });
116
+ }
117
+ }
118
+ break;
105
119
  case constants_1.GatewayEvents.ApplicationCommandPermissionsUpdate:
106
120
  this.client.emit("applicationCommandPermissionsUpdate", transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(packet.d));
107
121
  break;
@@ -379,6 +393,7 @@ class Shard {
379
393
  : undefined,
380
394
  temporary: packet.d.temporary,
381
395
  uses: packet.d.uses,
396
+ expiresAt: packet.d.expires_at,
382
397
  });
383
398
  break;
384
399
  case constants_1.GatewayEvents.InviteDelete:
@@ -8,6 +8,7 @@ export * from "./types/audit-log";
8
8
  export * from "./types/auto-moderation";
9
9
  export * from "./types/channel";
10
10
  export * from "./types/common";
11
+ export * from "./types/components";
11
12
  export * from "./types/emoji";
12
13
  export * from "./types/entitlements";
13
14
  export * from "./types/gateway-events";
@@ -16,7 +17,6 @@ export * from "./types/guild-template";
16
17
  export * from "./types/guild";
17
18
  export * from "./types/interaction";
18
19
  export * from "./types/invite";
19
- export * from "./types/message-components";
20
20
  export * from "./types/poll";
21
21
  export * from "./types/role";
22
22
  export * from "./types/sku";
package/dist/lib/index.js CHANGED
@@ -24,6 +24,7 @@ __exportStar(require("./types/audit-log"), exports);
24
24
  __exportStar(require("./types/auto-moderation"), exports);
25
25
  __exportStar(require("./types/channel"), exports);
26
26
  __exportStar(require("./types/common"), exports);
27
+ __exportStar(require("./types/components"), exports);
27
28
  __exportStar(require("./types/emoji"), exports);
28
29
  __exportStar(require("./types/entitlements"), exports);
29
30
  __exportStar(require("./types/gateway-events"), exports);
@@ -32,7 +33,6 @@ __exportStar(require("./types/guild-template"), exports);
32
33
  __exportStar(require("./types/guild"), exports);
33
34
  __exportStar(require("./types/interaction"), exports);
34
35
  __exportStar(require("./types/invite"), exports);
35
- __exportStar(require("./types/message-components"), exports);
36
36
  __exportStar(require("./types/poll"), exports);
37
37
  __exportStar(require("./types/role"), exports);
38
38
  __exportStar(require("./types/sku"), exports);
@@ -108,3 +108,7 @@ export declare const stageInstance: (channelID: snowflake) => `stage-instances/$
108
108
  export declare const stageInstances: () => "stage-instances";
109
109
  export declare const sticker: (stickerID: snowflake) => `stickers/${string}`;
110
110
  export declare const voiceRegions: () => "voice/regions";
111
+ export declare const lobbies: () => "lobbies";
112
+ export declare const lobby: (lobbyID: snowflake) => `lobbies/${string}`;
113
+ export declare const lobbyMember: (lobbyID: snowflake, userID?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
114
+ export declare const lobbyChannelLinking: (lobbyID: snowflake) => `lobbies/${string}/channel-linking`;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.channelInvites = 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.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
4
  exports.oauth2Application = 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 = void 0;
5
- exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = void 0;
5
+ 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 = void 0;
6
6
  // Guilds
7
7
  const guild = (guildID) => `guilds/${guildID}`;
8
8
  exports.guild = guild;
@@ -242,3 +242,12 @@ const sticker = (stickerID) => `stickers/${stickerID}`;
242
242
  exports.sticker = sticker;
243
243
  const voiceRegions = () => "voice/regions";
244
244
  exports.voiceRegions = voiceRegions;
245
+ // Lobbies
246
+ const lobbies = () => "lobbies";
247
+ exports.lobbies = lobbies;
248
+ const lobby = (lobbyID) => `lobbies/${lobbyID}`;
249
+ exports.lobby = lobby;
250
+ const lobbyMember = (lobbyID, userID = "@me") => `lobbies/${lobbyID}/members/${userID}`;
251
+ exports.lobbyMember = lobbyMember;
252
+ const lobbyChannelLinking = (lobbyID) => `lobbies/${lobbyID}/channel-linking`;
253
+ exports.lobbyChannelLinking = lobbyChannelLinking;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { type JSONErrorCodes } from "../constants";
4
2
  export declare enum RESTMethods {
5
3
  Get = "GET",
@@ -23,7 +21,7 @@ export interface ErrorResponse {
23
21
  errors: Record<string, unknown>;
24
22
  }
25
23
  export interface FileData {
26
- contents: Buffer;
24
+ contents: BlobPart;
27
25
  name: string;
28
26
  }
29
27
  export declare class RequestManager {
@@ -1,21 +1,29 @@
1
- import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, SelectMenu, RawSelectMenu, MediaGallery, RawMediaGallery } from "../types/message-components.js";
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 } from "../types/components";
2
2
  export declare class Components {
3
3
  static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
4
4
  static actionRowToRaw(actionRow: ActionRow): RawActionRow;
5
5
  static buttonFromRaw(button: RawButton): Button;
6
6
  static buttonToRaw(button: Button): RawButton;
7
+ static channelSelectFromRaw(channelSelect: RawChannelSelect): ChannelSelect;
8
+ static channelSelectToRaw(channelSelect: ChannelSelect): RawChannelSelect;
7
9
  static containerFromRaw(container: RawContainer): Container;
8
10
  static containerToRaw(container: Container): RawContainer;
9
11
  static fileFromRaw(file: RawFile): File;
10
12
  static fileToRaw(file: File): RawFile;
13
+ static labelFromRaw(label: RawLabel): Label;
14
+ static labelToRaw(label: Label): RawLabel;
11
15
  static mediaGalleryFromRaw(mediaGallery: RawMediaGallery): MediaGallery;
12
16
  static mediaGalleryToRaw(mediaGallery: MediaGallery): RawMediaGallery;
17
+ static mentionableSelectFromRaw(mentionableSelect: RawMentionableSelect): MentionableSelect;
18
+ static mentionableSelectToRaw(mentionableSelect: MentionableSelect): RawMentionableSelect;
19
+ static roleSelectFromRaw(roleSelect: RawRoleSelect): RoleSelect;
20
+ static roleSelectToRaw(roleSelect: RoleSelect): RawRoleSelect;
13
21
  static sectionFromRaw(section: RawSection): Section;
14
22
  static sectionToRaw(section: Section): RawSection;
15
- static selectMenuFromRaw(selectMenu: RawSelectMenu): SelectMenu;
16
- static selectMenuToRaw(selectMenu: SelectMenu): RawSelectMenu;
17
23
  static separatorFromRaw(separator: RawSeparator): Separator;
18
24
  static separatorToRaw(separator: Separator): RawSeparator;
25
+ static stringSelectFromRaw(stringSelect: RawStringSelect): StringSelect;
26
+ static stringSelectToRaw(stringSelect: StringSelect): RawStringSelect;
19
27
  static textDisplayFromRaw(textDisplay: RawTextDisplay): TextDisplay;
20
28
  static textDisplayToRaw(textDisplay: TextDisplay): RawTextDisplay;
21
29
  static textInputFromRaw(textInput: RawTextInput): TextInput;
@@ -24,4 +32,6 @@ export declare class Components {
24
32
  static thumbnailToRaw(thumbnail: Thumbnail): RawThumbnail;
25
33
  static unfurledMediaItemFromRaw(unfurledMediaItem: RawUnfurledMediaItem): UnfurledMediaItem;
26
34
  static unfurledMediaItemToRaw(unfurledMediaItem: UnfurledMediaItem): RawUnfurledMediaItem;
35
+ static userSelectFromRaw(userSelect: RawUserSelect): UserSelect;
36
+ static userSelectToRaw(userSelect: UserSelect): RawUserSelect;
27
37
  }