disgroove 2.2.6 → 2.2.7-dev.19963da
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Client.d.ts +46 -52
- package/dist/lib/Client.js +88 -59
- package/dist/lib/constants.d.ts +33 -22
- package/dist/lib/constants.js +36 -24
- package/dist/lib/gateway/Shard.js +14 -0
- package/dist/lib/rest/Endpoints.d.ts +4 -0
- package/dist/lib/rest/Endpoints.js +10 -1
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/transformers/Components.d.ts +13 -3
- package/dist/lib/transformers/Components.js +238 -135
- package/dist/lib/transformers/Interactions.js +130 -38
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +20 -34
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/gateway-events.d.ts +20 -0
- package/dist/lib/types/guild.d.ts +7 -5
- package/dist/lib/types/interaction.d.ts +14 -8
- package/dist/lib/types/invite.d.ts +2 -2
- package/dist/lib/types/lobby.d.ts +29 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message-components.d.ts +306 -118
- package/dist/lib/types/message.d.ts +2 -4
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/constants.d.ts
CHANGED
|
@@ -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/
|
|
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#
|
|
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/
|
|
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,
|
|
@@ -254,6 +255,7 @@ export declare enum AuditLogEvents {
|
|
|
254
255
|
AutoModerationBlockMessage = 143,
|
|
255
256
|
AutoModerationFlagToChannel = 144,
|
|
256
257
|
AutoModerationUserCommunicationDisabled = 145,
|
|
258
|
+
AutoModerationQuarantineUser = 146,
|
|
257
259
|
CreatorMonetizationRequestCreated = 150,
|
|
258
260
|
CreatorMonetizationTermsAccepted = 151,
|
|
259
261
|
OnboardingPromptCreate = 163,
|
|
@@ -407,6 +409,7 @@ export declare enum GuildFeatures {
|
|
|
407
409
|
VipRegions = "VIP_REGIONS",
|
|
408
410
|
WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED",
|
|
409
411
|
GuestsEnabled = "GUESTS_ENABLED",
|
|
412
|
+
GuildTags = "GUILD_TAGS",
|
|
410
413
|
EnhancedRoleColors = "ENHANCED_ROLE_COLORS"
|
|
411
414
|
}
|
|
412
415
|
/** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
|
|
@@ -426,7 +429,8 @@ export declare enum GuildMemberFlags {
|
|
|
426
429
|
StartedHomeActions = 32,
|
|
427
430
|
CompletedHomeActions = 64,
|
|
428
431
|
AutomodQuarantinedUsername = 128,
|
|
429
|
-
DMSettingsUpsellAckownledge = 512
|
|
432
|
+
DMSettingsUpsellAckownledge = 512,
|
|
433
|
+
AutomodQuarantinedGuildTag = 1024
|
|
430
434
|
}
|
|
431
435
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */
|
|
432
436
|
export declare enum IntegrationExpireBehaviors {
|
|
@@ -515,6 +519,10 @@ export declare enum InviteTargetTypes {
|
|
|
515
519
|
export declare enum GuildInviteFlags {
|
|
516
520
|
IsGuestInvite = 1
|
|
517
521
|
}
|
|
522
|
+
/** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-flags */
|
|
523
|
+
export declare enum LobbyMemberFlags {
|
|
524
|
+
CanLinkLobby = 1
|
|
525
|
+
}
|
|
518
526
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
519
527
|
export declare enum MessageTypes {
|
|
520
528
|
Default = 0,
|
|
@@ -745,6 +753,7 @@ export declare enum StatusTypes {
|
|
|
745
753
|
export declare enum GatewayEvents {
|
|
746
754
|
Ready = "READY",
|
|
747
755
|
Resumed = "RESUMED",
|
|
756
|
+
RateLimited = "RATE_LIMITED",
|
|
748
757
|
ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
|
|
749
758
|
AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
|
|
750
759
|
AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
|
|
@@ -1170,6 +1179,7 @@ export declare enum JSONErrorCodes {
|
|
|
1170
1179
|
MessageBlockedByHarmfulLinksFilter = 240000,
|
|
1171
1180
|
CannotEnableOnboardingRequirementsAreNotMet = 350000,
|
|
1172
1181
|
CannotUpdateOnboardingWhileBelowRequirements = 350001,
|
|
1182
|
+
AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
|
|
1173
1183
|
FailedToBanUsers = 500000,
|
|
1174
1184
|
PollVotingBlocked = 520000,
|
|
1175
1185
|
PollExpired = 520001,
|
|
@@ -1258,6 +1268,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1258
1268
|
readonly SendVoiceMessages: bigint;
|
|
1259
1269
|
readonly SendPolls: bigint;
|
|
1260
1270
|
readonly UseExternalApps: bigint;
|
|
1271
|
+
readonly PinMessages: bigint;
|
|
1261
1272
|
};
|
|
1262
1273
|
/** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
|
|
1263
1274
|
export declare enum RoleFlags {
|
package/dist/lib/constants.js
CHANGED
|
@@ -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.
|
|
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/
|
|
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#
|
|
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/
|
|
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) {
|
|
@@ -279,6 +280,7 @@ var AuditLogEvents;
|
|
|
279
280
|
AuditLogEvents[AuditLogEvents["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage";
|
|
280
281
|
AuditLogEvents[AuditLogEvents["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel";
|
|
281
282
|
AuditLogEvents[AuditLogEvents["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled";
|
|
283
|
+
AuditLogEvents[AuditLogEvents["AutoModerationQuarantineUser"] = 146] = "AutoModerationQuarantineUser";
|
|
282
284
|
AuditLogEvents[AuditLogEvents["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated";
|
|
283
285
|
AuditLogEvents[AuditLogEvents["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted";
|
|
284
286
|
AuditLogEvents[AuditLogEvents["OnboardingPromptCreate"] = 163] = "OnboardingPromptCreate";
|
|
@@ -449,6 +451,7 @@ var GuildFeatures;
|
|
|
449
451
|
GuildFeatures["VipRegions"] = "VIP_REGIONS";
|
|
450
452
|
GuildFeatures["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
|
|
451
453
|
GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
|
|
454
|
+
GuildFeatures["GuildTags"] = "GUILD_TAGS";
|
|
452
455
|
GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
|
|
453
456
|
})(GuildFeatures || (exports.GuildFeatures = GuildFeatures = {}));
|
|
454
457
|
/** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
|
|
@@ -471,6 +474,7 @@ var GuildMemberFlags;
|
|
|
471
474
|
GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions";
|
|
472
475
|
GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsername"] = 128] = "AutomodQuarantinedUsername";
|
|
473
476
|
GuildMemberFlags[GuildMemberFlags["DMSettingsUpsellAckownledge"] = 512] = "DMSettingsUpsellAckownledge";
|
|
477
|
+
GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedGuildTag"] = 1024] = "AutomodQuarantinedGuildTag";
|
|
474
478
|
})(GuildMemberFlags || (exports.GuildMemberFlags = GuildMemberFlags = {}));
|
|
475
479
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */
|
|
476
480
|
var IntegrationExpireBehaviors;
|
|
@@ -572,6 +576,11 @@ var GuildInviteFlags;
|
|
|
572
576
|
(function (GuildInviteFlags) {
|
|
573
577
|
GuildInviteFlags[GuildInviteFlags["IsGuestInvite"] = 1] = "IsGuestInvite";
|
|
574
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 = {}));
|
|
575
584
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
576
585
|
var MessageTypes;
|
|
577
586
|
(function (MessageTypes) {
|
|
@@ -824,6 +833,7 @@ var GatewayEvents;
|
|
|
824
833
|
(function (GatewayEvents) {
|
|
825
834
|
GatewayEvents["Ready"] = "READY";
|
|
826
835
|
GatewayEvents["Resumed"] = "RESUMED";
|
|
836
|
+
GatewayEvents["RateLimited"] = "RATE_LIMITED";
|
|
827
837
|
GatewayEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
|
|
828
838
|
GatewayEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
|
|
829
839
|
GatewayEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
|
|
@@ -1259,6 +1269,7 @@ var JSONErrorCodes;
|
|
|
1259
1269
|
JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
|
|
1260
1270
|
JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
|
|
1261
1271
|
JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
|
|
1272
|
+
JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
|
|
1262
1273
|
JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
|
|
1263
1274
|
JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
|
|
1264
1275
|
JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
|
|
@@ -1349,6 +1360,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1349
1360
|
SendVoiceMessages: 1n << 46n,
|
|
1350
1361
|
SendPolls: 1n << 49n,
|
|
1351
1362
|
UseExternalApps: 1n << 50n,
|
|
1363
|
+
PinMessages: 1n << 51n,
|
|
1352
1364
|
};
|
|
1353
1365
|
/** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
|
|
1354
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;
|
|
@@ -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:
|
|
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,
|
|
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;
|
|
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
|
}
|