disgroove 2.2.7-dev.4cca8cf → 2.2.7-dev.64580a3

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.
@@ -14,7 +14,7 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
14
14
  import type { LocaleMap, snowflake, timestamp } from "./types/common";
15
15
  import type { Emoji } from "./types/emoji";
16
16
  import type { Entitlement } from "./types/entitlements";
17
- import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields, GuildSoundboardSoundDeleteEventFields } from "./types/gateway-events";
17
+ import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields, GuildSoundboardSoundDeleteEventFields, RateLimitedFields } from "./types/gateway-events";
18
18
  import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel, IncidentsData } from "./types/guild";
19
19
  import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
20
20
  import type { GuildTemplate } from "./types/guild-template";
@@ -29,9 +29,10 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
29
29
  import type { VoiceRegion, VoiceState } from "./types/voice";
30
30
  import type { Webhook } from "./types/webhook";
31
31
  import type { ClientOptions as WebSocketOptions } from "ws";
32
- import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessageTopLevelComponent, MessagePin } from "./types/message";
32
+ import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin } from "./types/message";
33
33
  import type { Subscription } from "./types/subscription";
34
34
  import type { SoundboardSound } from "./types/soundboard";
35
+ import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/message-components";
35
36
  export interface GatewayOptions {
36
37
  properties?: IdentifyConnectionProperties;
37
38
  compress?: boolean;
@@ -275,7 +276,7 @@ export declare class Client extends EventEmitter {
275
276
  tts?: boolean;
276
277
  embeds?: Array<Embed>;
277
278
  allowedMentions?: AllowedMentions;
278
- components?: Array<MessageTopLevelComponent>;
279
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
279
280
  files?: Array<FileData> | null;
280
281
  attachments?: Array<Pick<Attachment, "filename" | "description">>;
281
282
  flags?: MessageFlags;
@@ -295,7 +296,7 @@ export declare class Client extends EventEmitter {
295
296
  embeds?: Array<Embed>;
296
297
  allowedMentions?: AllowedMentions;
297
298
  messageReference?: MessageReference;
298
- components?: Array<MessageTopLevelComponent>;
299
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
299
300
  stickersIDs?: Array<snowflake>;
300
301
  files?: Array<FileData>;
301
302
  attachments?: Array<Pick<Attachment, "filename" | "description">>;
@@ -328,7 +329,7 @@ export declare class Client extends EventEmitter {
328
329
  content?: string;
329
330
  embeds?: Array<Embed>;
330
331
  allowedMentions?: AllowedMentions;
331
- components?: Array<MessageTopLevelComponent>;
332
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
332
333
  stickerIDs?: Array<snowflake>;
333
334
  attachments?: Array<Pick<Attachment, "filename" | "description">>;
334
335
  flags?: MessageFlags;
@@ -628,7 +629,7 @@ export declare class Client extends EventEmitter {
628
629
  embeds?: Array<Embed> | null;
629
630
  flags?: MessageFlags | null;
630
631
  allowedMentions?: AllowedMentions | null;
631
- components?: Array<MessageTopLevelComponent> | null;
632
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container> | null;
632
633
  files?: Array<FileData> | null;
633
634
  attachments?: Array<Attachment> | null;
634
635
  }): Promise<Message>;
@@ -642,7 +643,7 @@ export declare class Client extends EventEmitter {
642
643
  content?: string | null;
643
644
  embeds?: Array<Embed> | null;
644
645
  allowedMentions?: AllowedMentions | null;
645
- components?: Array<MessageTopLevelComponent> | null;
646
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container> | null;
646
647
  files?: Array<FileData> | null;
647
648
  attachments?: Array<Partial<Attachment>> | null;
648
649
  poll?: PollCreateParams | null;
@@ -653,7 +654,7 @@ export declare class Client extends EventEmitter {
653
654
  content?: string | null;
654
655
  embeds?: Array<Embed> | null;
655
656
  allowedMentions?: AllowedMentions | null;
656
- components?: Array<MessageTopLevelComponent> | null;
657
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container> | null;
657
658
  files?: Array<FileData> | null;
658
659
  attachments?: Array<Partial<Attachment>> | null;
659
660
  poll?: PollCreateParams | null;
@@ -675,7 +676,7 @@ export declare class Client extends EventEmitter {
675
676
  content?: string | null;
676
677
  embeds?: Array<Embed> | null;
677
678
  allowedMentions?: AllowedMentions | null;
678
- components?: Array<MessageTopLevelComponent> | null;
679
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container> | null;
679
680
  files?: Array<FileData> | null;
680
681
  attachments?: Array<Partial<Attachment>> | null;
681
682
  poll?: PollCreateParams | null;
@@ -697,7 +698,7 @@ export declare class Client extends EventEmitter {
697
698
  tts?: boolean;
698
699
  embeds?: Array<Embed>;
699
700
  allowedMentions?: AllowedMentions;
700
- components?: Array<MessageTopLevelComponent>;
701
+ components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
701
702
  files?: Array<FileData>;
702
703
  attachments?: Array<Pick<Attachment, "filename" | "description">>;
703
704
  flags?: MessageFlags;
@@ -1085,6 +1086,7 @@ export interface ClientEvents {
1085
1086
  hello: [interval: number, shard: number];
1086
1087
  ready: [];
1087
1088
  resumed: [];
1089
+ rateLimited: [rateLimit: RateLimitedFields];
1088
1090
  reconnect: [];
1089
1091
  invalidSession: [];
1090
1092
  applicationCommandPermissionsUpdate: [
@@ -465,7 +465,38 @@ class Client extends node_events_1.default {
465
465
  : undefined,
466
466
  flags: options.data?.flags,
467
467
  components: options.data?.components !== undefined
468
- ? transformers_1.Messages.componentsToRaw(options.data.components)
468
+ ? options.data?.components.map((component) => {
469
+ switch (component.type) {
470
+ case constants_1.ComponentTypes.ActionRow:
471
+ return transformers_1.Components.actionRowToRaw(component);
472
+ case constants_1.ComponentTypes.Button:
473
+ return transformers_1.Components.buttonToRaw(component);
474
+ case constants_1.ComponentTypes.StringSelect:
475
+ return transformers_1.Components.stringSelectToRaw(component);
476
+ case constants_1.ComponentTypes.UserSelect:
477
+ return transformers_1.Components.userSelectToRaw(component);
478
+ case constants_1.ComponentTypes.RoleSelect:
479
+ return transformers_1.Components.roleSelectToRaw(component);
480
+ case constants_1.ComponentTypes.MentionableSelect:
481
+ return transformers_1.Components.mentionableSelectToRaw(component);
482
+ case constants_1.ComponentTypes.ChannelSelect:
483
+ return transformers_1.Components.channelSelectToRaw(component);
484
+ case constants_1.ComponentTypes.Section:
485
+ return transformers_1.Components.sectionToRaw(component);
486
+ case constants_1.ComponentTypes.TextDisplay:
487
+ return transformers_1.Components.textDisplayToRaw(component);
488
+ case constants_1.ComponentTypes.Thumbnail:
489
+ return transformers_1.Components.thumbnailToRaw(component);
490
+ case constants_1.ComponentTypes.MediaGallery:
491
+ return transformers_1.Components.mediaGalleryToRaw(component);
492
+ case constants_1.ComponentTypes.File:
493
+ return transformers_1.Components.fileToRaw(component);
494
+ case constants_1.ComponentTypes.Separator:
495
+ return transformers_1.Components.separatorToRaw(component);
496
+ case constants_1.ComponentTypes.Container:
497
+ return transformers_1.Components.containerToRaw(component);
498
+ }
499
+ })
469
500
  : undefined,
470
501
  attachments: options.data?.attachments,
471
502
  poll: options.data?.poll !== undefined
@@ -517,7 +548,16 @@ class Client extends node_events_1.default {
517
548
  data: {
518
549
  custom_id: options.data?.customID,
519
550
  components: options.data?.components !== undefined
520
- ? transformers_1.Messages.componentsToRaw(options.data.components)
551
+ ? options.data?.components.map((component) => {
552
+ switch (component.type) {
553
+ case constants_1.ComponentTypes.ActionRow:
554
+ return transformers_1.Components.actionRowToRaw(component);
555
+ case constants_1.ComponentTypes.TextDisplay:
556
+ return transformers_1.Components.textDisplayToRaw(component);
557
+ case constants_1.ComponentTypes.Label:
558
+ return transformers_1.Components.labelToRaw(component);
559
+ }
560
+ })
521
561
  : undefined,
522
562
  title: options.data?.title,
523
563
  },
@@ -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
126
- }
127
- /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
128
- export declare enum SeparatorSpacing {
129
- Small = 1,
130
- Large = 2
137
+ Container = 17,
138
+ Label = 18
131
139
  }
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,
@@ -748,6 +749,7 @@ export declare enum StatusTypes {
748
749
  export declare enum GatewayEvents {
749
750
  Ready = "READY",
750
751
  Resumed = "RESUMED",
752
+ RateLimited = "RATE_LIMITED",
751
753
  ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
752
754
  AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
753
755
  AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
@@ -1261,6 +1263,7 @@ export declare const BitwisePermissionFlags: {
1261
1263
  readonly SendVoiceMessages: bigint;
1262
1264
  readonly SendPolls: bigint;
1263
1265
  readonly UseExternalApps: bigint;
1266
+ readonly PinMessages: bigint;
1264
1267
  };
1265
1268
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1266
1269
  export declare enum RoleFlags {
@@ -1,6 +1,6 @@
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;
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
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;
5
5
  /** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
6
6
  var 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) {
@@ -827,6 +828,7 @@ var GatewayEvents;
827
828
  (function (GatewayEvents) {
828
829
  GatewayEvents["Ready"] = "READY";
829
830
  GatewayEvents["Resumed"] = "RESUMED";
831
+ GatewayEvents["RateLimited"] = "RATE_LIMITED";
830
832
  GatewayEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
831
833
  GatewayEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
832
834
  GatewayEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
@@ -1352,6 +1354,7 @@ exports.BitwisePermissionFlags = {
1352
1354
  SendVoiceMessages: 1n << 46n,
1353
1355
  SendPolls: 1n << 49n,
1354
1356
  UseExternalApps: 1n << 50n,
1357
+ PinMessages: 1n << 51n,
1355
1358
  };
1356
1359
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1357
1360
  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;
@@ -1,19 +1,27 @@
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/message-components.js";
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;
23
+ static stringSelectFromRaw(stringSelect: RawStringSelect): StringSelect;
24
+ static stringSelectToRaw(stringSelect: StringSelect): RawStringSelect;
17
25
  static separatorFromRaw(separator: RawSeparator): Separator;
18
26
  static separatorToRaw(separator: Separator): RawSeparator;
19
27
  static textDisplayFromRaw(textDisplay: RawTextDisplay): TextDisplay;
@@ -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
  }