disgroove 3.0.1-dev.c1d6d42 → 3.0.2
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/LICENSE +1 -1
- package/dist/lib/Client.d.ts +53 -11
- package/dist/lib/Client.js +79 -23
- package/dist/lib/constants.d.ts +21 -9
- package/dist/lib/constants.js +21 -8
- package/dist/lib/gateway/Dispatcher.js +1 -0
- package/dist/lib/gateway/Shard.js +1 -0
- package/dist/lib/gateway/Transmitter.js +2 -1
- package/dist/lib/rest/Endpoints.d.ts +5 -1
- package/dist/lib/rest/Endpoints.js +9 -1
- package/dist/lib/rest/RequestManager.d.ts +1 -0
- package/dist/lib/rest/RequestManager.js +2 -3
- package/dist/lib/transformers/ApplicationCommands.js +2 -0
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/Channels.d.ts +3 -0
- package/dist/lib/transformers/Channels.js +24 -0
- package/dist/lib/transformers/Components.js +2 -0
- package/dist/lib/transformers/Lobbies.d.ts +3 -1
- package/dist/lib/transformers/Lobbies.js +31 -0
- package/dist/lib/types/application-command.d.ts +2 -0
- package/dist/lib/types/application.d.ts +2 -0
- package/dist/lib/types/channel.d.ts +4 -2
- package/dist/lib/types/components.d.ts +4 -2
- package/dist/lib/types/gateway-events.d.ts +9 -3
- package/dist/lib/types/lobby.d.ts +38 -1
- package/dist/lib/types/message.d.ts +20 -0
- package/dist/lib/utils/formatters.d.ts +2 -0
- package/dist/lib/utils/formatters.js +5 -0
- package/dist/package.json +6 -5
- package/package.json +7 -6
package/dist/lib/constants.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.UnfurledMediaItemFlags = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = void 0;
|
|
4
|
+
exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.GatewayCapabilities = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.SearchSortModes = exports.SearchEmbedTypes = exports.SearchHasTypes = exports.AuthorTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedMediaFlags = exports.EmbedFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = void 0;
|
|
5
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = void 0;
|
|
6
6
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
7
7
|
var TimestampStyles;
|
|
8
8
|
(function (TimestampStyles) {
|
|
@@ -364,6 +364,8 @@ var ChannelFlags;
|
|
|
364
364
|
ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned";
|
|
365
365
|
ChannelFlags[ChannelFlags["RequiredTag"] = 16] = "RequiredTag";
|
|
366
366
|
ChannelFlags[ChannelFlags["HideMediaDownloadOptions"] = 32768] = "HideMediaDownloadOptions";
|
|
367
|
+
ChannelFlags[ChannelFlags["ChannelObfuscated"] = 131072] = "ChannelObfuscated";
|
|
368
|
+
ChannelFlags[ChannelFlags["IsSpoilerChannel"] = 2097152] = "IsSpoilerChannel";
|
|
367
369
|
})(ChannelFlags || (exports.ChannelFlags = ChannelFlags = {}));
|
|
368
370
|
/** https://discord.com/developers/docs/resources/channel#channel-object-sort-order-types */
|
|
369
371
|
var SortOrderTypes;
|
|
@@ -445,7 +447,10 @@ var GuildFeatures;
|
|
|
445
447
|
GuildFeatures["CreatorStorePage"] = "CREATOR_STORE_PAGE";
|
|
446
448
|
GuildFeatures["DeveloperSupportServer"] = "DEVELOPER_SUPPORT_SERVER";
|
|
447
449
|
GuildFeatures["Discoverable"] = "DISCOVERABLE";
|
|
450
|
+
GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
|
|
448
451
|
GuildFeatures["Featurable"] = "FEATURABLE";
|
|
452
|
+
GuildFeatures["GuildTags"] = "GUILD_TAGS";
|
|
453
|
+
GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
|
|
449
454
|
GuildFeatures["InvitesDisabled"] = "INVITES_DISABLED";
|
|
450
455
|
GuildFeatures["InviteSplash"] = "INVITE_SPLASH";
|
|
451
456
|
GuildFeatures["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
|
|
@@ -454,6 +459,7 @@ var GuildFeatures;
|
|
|
454
459
|
GuildFeatures["News"] = "NEWS";
|
|
455
460
|
GuildFeatures["Partnered"] = "PARTNERED";
|
|
456
461
|
GuildFeatures["PreviewEnabled"] = "PREVIEW_ENABLED";
|
|
462
|
+
GuildFeatures["PruneRequiresAdmin"] = "PRUNE_REQUIRES_ADMIN";
|
|
457
463
|
GuildFeatures["RaidAlertsDisabled"] = "RAID_ALERTS_DISABLED";
|
|
458
464
|
GuildFeatures["RoleIcons"] = "ROLE_ICONS";
|
|
459
465
|
GuildFeatures["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE";
|
|
@@ -464,9 +470,6 @@ var GuildFeatures;
|
|
|
464
470
|
GuildFeatures["Verified"] = "VERIFIED";
|
|
465
471
|
GuildFeatures["VipRegions"] = "VIP_REGIONS";
|
|
466
472
|
GuildFeatures["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
|
|
467
|
-
GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
|
|
468
|
-
GuildFeatures["GuildTags"] = "GUILD_TAGS";
|
|
469
|
-
GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
|
|
470
473
|
})(GuildFeatures || (exports.GuildFeatures = GuildFeatures = {}));
|
|
471
474
|
/** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
|
|
472
475
|
var MutableGuildFeatures;
|
|
@@ -651,6 +654,7 @@ var MessageActivityTypes;
|
|
|
651
654
|
MessageActivityTypes[MessageActivityTypes["Spectate"] = 2] = "Spectate";
|
|
652
655
|
MessageActivityTypes[MessageActivityTypes["Listen"] = 3] = "Listen";
|
|
653
656
|
MessageActivityTypes[MessageActivityTypes["JoinRequest"] = 5] = "JoinRequest";
|
|
657
|
+
MessageActivityTypes[MessageActivityTypes["StreamRequest"] = 6] = "StreamRequest";
|
|
654
658
|
})(MessageActivityTypes || (exports.MessageActivityTypes = MessageActivityTypes = {}));
|
|
655
659
|
/** https://discord.com/developers/docs/resources/message#message-object-message-flags */
|
|
656
660
|
var MessageFlags;
|
|
@@ -854,8 +858,8 @@ var VisibilityTypes;
|
|
|
854
858
|
var SubscriptionStatuses;
|
|
855
859
|
(function (SubscriptionStatuses) {
|
|
856
860
|
SubscriptionStatuses[SubscriptionStatuses["Active"] = 0] = "Active";
|
|
857
|
-
SubscriptionStatuses[SubscriptionStatuses["
|
|
858
|
-
SubscriptionStatuses[SubscriptionStatuses["
|
|
861
|
+
SubscriptionStatuses[SubscriptionStatuses["Inactive"] = 1] = "Inactive";
|
|
862
|
+
SubscriptionStatuses[SubscriptionStatuses["Ending"] = 2] = "Ending";
|
|
859
863
|
})(SubscriptionStatuses || (exports.SubscriptionStatuses = SubscriptionStatuses = {}));
|
|
860
864
|
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
|
|
861
865
|
var WebhookTypes;
|
|
@@ -908,6 +912,11 @@ var StatusTypes;
|
|
|
908
912
|
StatusTypes["Invisible"] = "invisible";
|
|
909
913
|
StatusTypes["Offline"] = "offline";
|
|
910
914
|
})(StatusTypes || (exports.StatusTypes = StatusTypes = {}));
|
|
915
|
+
/** https://docs.discord.com/developers/events/gateway-events#identify-gateway-capabilities */
|
|
916
|
+
var GatewayCapabilities;
|
|
917
|
+
(function (GatewayCapabilities) {
|
|
918
|
+
GatewayCapabilities[GatewayCapabilities["ChannelObfuscation"] = 32768] = "ChannelObfuscation";
|
|
919
|
+
})(GatewayCapabilities || (exports.GatewayCapabilities = GatewayCapabilities = {}));
|
|
911
920
|
/** https://discord.com/developers/docs/topics/gateway-events#receive-events */
|
|
912
921
|
var GatewayEvents;
|
|
913
922
|
(function (GatewayEvents) {
|
|
@@ -1041,6 +1050,7 @@ var OAuth2Scopes;
|
|
|
1041
1050
|
OAuth2Scopes["GuildsJoin"] = "guilds.join";
|
|
1042
1051
|
OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
|
|
1043
1052
|
OAuth2Scopes["Identify"] = "identify";
|
|
1053
|
+
OAuth2Scopes["IdentifyPremium"] = "identify.premium";
|
|
1044
1054
|
OAuth2Scopes["MessagesRead"] = "messages.read";
|
|
1045
1055
|
OAuth2Scopes["RelationShipsRead"] = "relationships.read";
|
|
1046
1056
|
OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
|
|
@@ -1192,8 +1202,8 @@ var JSONErrorCodes;
|
|
|
1192
1202
|
JSONErrorCodes[JSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
|
|
1193
1203
|
JSONErrorCodes[JSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
|
|
1194
1204
|
JSONErrorCodes[JSONErrorCodes["NotAuthorizedToPerformThisActionOnThisApplication"] = 20012] = "NotAuthorizedToPerformThisActionOnThisApplication";
|
|
1205
|
+
JSONErrorCodes[JSONErrorCodes["ThisActionRequiresAPremiumSubscription"] = 20015] = "ThisActionRequiresAPremiumSubscription";
|
|
1195
1206
|
JSONErrorCodes[JSONErrorCodes["ActionCannotBePerformedDueToSlowmodeRateLimit"] = 20016] = "ActionCannotBePerformedDueToSlowmodeRateLimit";
|
|
1196
|
-
JSONErrorCodes[JSONErrorCodes["TheMazeIsntMeantForYou"] = 20017] = "TheMazeIsntMeantForYou";
|
|
1197
1207
|
JSONErrorCodes[JSONErrorCodes["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction";
|
|
1198
1208
|
JSONErrorCodes[JSONErrorCodes["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded";
|
|
1199
1209
|
JSONErrorCodes[JSONErrorCodes["UnderMinimumAge"] = 20024] = "UnderMinimumAge";
|
|
@@ -1242,6 +1252,7 @@ var JSONErrorCodes;
|
|
|
1242
1252
|
JSONErrorCodes[JSONErrorCodes["RequestEntityTooLarge"] = 40005] = "RequestEntityTooLarge";
|
|
1243
1253
|
JSONErrorCodes[JSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide";
|
|
1244
1254
|
JSONErrorCodes[JSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild";
|
|
1255
|
+
JSONErrorCodes[JSONErrorCodes["OnlyOneChannelCanHaveAParentIdModifiedAtATime"] = 40009] = "OnlyOneChannelCanHaveAParentIdModifiedAtATime";
|
|
1245
1256
|
JSONErrorCodes[JSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
|
|
1246
1257
|
JSONErrorCodes[JSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed";
|
|
1247
1258
|
JSONErrorCodes[JSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements";
|
|
@@ -1325,6 +1336,7 @@ var JSONErrorCodes;
|
|
|
1325
1336
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
|
|
1326
1337
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesCannotBeEdited"] = 50162] = "VoiceMessagesCannotBeEdited";
|
|
1327
1338
|
JSONErrorCodes[JSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
|
|
1339
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed"] = 50167] = "CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed";
|
|
1328
1340
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1329
1341
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1330
1342
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
@@ -1360,6 +1372,7 @@ var JSONErrorCodes;
|
|
|
1360
1372
|
JSONErrorCodes[JSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels";
|
|
1361
1373
|
JSONErrorCodes[JSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels";
|
|
1362
1374
|
JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
|
|
1375
|
+
JSONErrorCodes[JSONErrorCodes["AccessToJoiningNewServersHasBeenLimitedForTheUser"] = 340015] = "AccessToJoiningNewServersHasBeenLimitedForTheUser";
|
|
1363
1376
|
JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
|
|
1364
1377
|
JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
|
|
1365
1378
|
JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
|
|
@@ -337,6 +337,7 @@ exports.Handlers = {
|
|
|
337
337
|
? transformers_1.Guilds.guildMemberFromRaw(data.member)
|
|
338
338
|
: undefined,
|
|
339
339
|
mentions: data.mentions.map((mention) => transformers_1.Users.userFromRaw(mention)),
|
|
340
|
+
channelType: data.channel_type,
|
|
340
341
|
});
|
|
341
342
|
},
|
|
342
343
|
[constants_1.GatewayEvents.MessageUpdate]: (shard, data) => {
|
|
@@ -37,6 +37,7 @@ class Transmitter {
|
|
|
37
37
|
shard: options.shard,
|
|
38
38
|
presence: options.presence,
|
|
39
39
|
intents: options.intents,
|
|
40
|
+
capabilities: options.capabilities,
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
|
@@ -60,7 +61,7 @@ class Transmitter {
|
|
|
60
61
|
requestChannelInfo(options) {
|
|
61
62
|
this.send(constants_1.GatewayOPCodes.RequestChannelInfo, {
|
|
62
63
|
guild_id: options.guildId,
|
|
63
|
-
fields: options.fields
|
|
64
|
+
fields: options.fields,
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
@@ -60,7 +60,7 @@ export declare const channelPermission: (channelId: snowflake, overwriteId: snow
|
|
|
60
60
|
export declare const channelPin: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/pins/${string}`;
|
|
61
61
|
export declare const channelPins: (channelId: snowflake) => `channels/${string}/messages/pins`;
|
|
62
62
|
export declare const channelRecipient: (channelId: snowflake, userId: snowflake) => `channels/${string}/recipients/${string}`;
|
|
63
|
-
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/
|
|
63
|
+
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/public` | `channels/${string}/threads/archived/private`;
|
|
64
64
|
export declare const channelTyping: (channelId: snowflake) => `channels/${string}/typing`;
|
|
65
65
|
export declare const channelWebhooks: (channelId: snowflake) => `channels/${string}/webhooks`;
|
|
66
66
|
export declare const threads: (channelId: snowflake, messageId?: snowflake) => `channels/${string}/threads`;
|
|
@@ -113,7 +113,11 @@ export declare const sticker: (stickerId: snowflake) => `stickers/${string}`;
|
|
|
113
113
|
export declare const voiceRegions: () => "voice/regions";
|
|
114
114
|
export declare const lobbies: () => "lobbies";
|
|
115
115
|
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
116
|
+
export declare const lobbyMessages: (lobbyId: snowflake) => `lobbies/${string}/messages`;
|
|
116
117
|
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
118
|
+
export declare const lobbyChannelInvite: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}/invites`;
|
|
117
119
|
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|
|
120
|
+
export declare const lobbyMembersBulk: (lobbyId: snowflake) => `lobbies/${string}/members/bulk`;
|
|
121
|
+
export declare const lobbyMessageModerationMetadata: (lobbyId: snowflake, messageId: snowflake) => `lobbies/${string}/messages/${string}/moderation-metadata`;
|
|
118
122
|
export declare const inviteTargetUsers: (inviteCode: string) => `invites/${string}/target-users`;
|
|
119
123
|
export declare const inviteTargetUsersJobStatus: (inviteCode: string) => `invites/${string}/target-users/job-status`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMessagesSearch = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
|
4
4
|
exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.channelVoiceStatus = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = void 0;
|
|
5
|
-
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = void 0;
|
|
5
|
+
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyMessageModerationMetadata = exports.lobbyMembersBulk = exports.lobbyChannelLinking = exports.lobbyChannelInvite = exports.lobbyMember = exports.lobbyMessages = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = void 0;
|
|
6
6
|
// Guilds
|
|
7
7
|
const guild = (guildId) => `guilds/${guildId}`;
|
|
8
8
|
exports.guild = guild;
|
|
@@ -253,10 +253,18 @@ const lobbies = () => "lobbies";
|
|
|
253
253
|
exports.lobbies = lobbies;
|
|
254
254
|
const lobby = (lobbyId) => `lobbies/${lobbyId}`;
|
|
255
255
|
exports.lobby = lobby;
|
|
256
|
+
const lobbyMessages = (lobbyId) => `lobbies/${lobbyId}/messages`;
|
|
257
|
+
exports.lobbyMessages = lobbyMessages;
|
|
256
258
|
const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}`;
|
|
257
259
|
exports.lobbyMember = lobbyMember;
|
|
260
|
+
const lobbyChannelInvite = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}/invites`;
|
|
261
|
+
exports.lobbyChannelInvite = lobbyChannelInvite;
|
|
258
262
|
const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
|
|
259
263
|
exports.lobbyChannelLinking = lobbyChannelLinking;
|
|
264
|
+
const lobbyMembersBulk = (lobbyId) => `lobbies/${lobbyId}/members/bulk`;
|
|
265
|
+
exports.lobbyMembersBulk = lobbyMembersBulk;
|
|
266
|
+
const lobbyMessageModerationMetadata = (lobbyId, messageId) => `lobbies/${lobbyId}/messages/${messageId}/moderation-metadata`;
|
|
267
|
+
exports.lobbyMessageModerationMetadata = lobbyMessageModerationMetadata;
|
|
260
268
|
// Invites
|
|
261
269
|
const inviteTargetUsers = (inviteCode) => `invites/${inviteCode}/target-users`;
|
|
262
270
|
exports.inviteTargetUsers = inviteTargetUsers;
|
|
@@ -123,9 +123,8 @@ class RequestManager {
|
|
|
123
123
|
resolve(null);
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
resolve(blob);
|
|
126
|
+
if (data?.returnsBlob) {
|
|
127
|
+
resolve((await response.blob));
|
|
129
128
|
}
|
|
130
129
|
resolve((await response.json()));
|
|
131
130
|
}
|
|
@@ -64,6 +64,7 @@ class ApplicationCommands {
|
|
|
64
64
|
min_length: option.minLength,
|
|
65
65
|
max_length: option.maxLength,
|
|
66
66
|
autocomplete: option.autocomplete,
|
|
67
|
+
file_types: option.fileTypes,
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
static optionFromRaw(option) {
|
|
@@ -86,6 +87,7 @@ class ApplicationCommands {
|
|
|
86
87
|
minLength: option.min_length,
|
|
87
88
|
maxLength: option.max_length,
|
|
88
89
|
autocomplete: option.autocomplete,
|
|
90
|
+
fileTypes: option.file_types,
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
}
|
|
@@ -29,6 +29,7 @@ class Applications {
|
|
|
29
29
|
slug: application.slug,
|
|
30
30
|
coverImage: application.cover_image,
|
|
31
31
|
flags: application.flags,
|
|
32
|
+
flagsNew: application.flags_new,
|
|
32
33
|
approximateGuildCount: application.approximate_guild_count,
|
|
33
34
|
approximateUserInstallCount: application.approximate_user_install_count,
|
|
34
35
|
approximateUserAuthorizationCount: application.approximate_user_authorization_count,
|
|
@@ -79,6 +80,7 @@ class Applications {
|
|
|
79
80
|
slug: application.slug,
|
|
80
81
|
cover_image: application.coverImage,
|
|
81
82
|
flags: application.flags,
|
|
83
|
+
flags_new: application.flagsNew,
|
|
82
84
|
approximate_guild_count: application.approximateGuildCount,
|
|
83
85
|
approximate_user_install_count: application.approximateUserInstallCount,
|
|
84
86
|
approximate_user_authorization_count: application.approximateUserAuthorizationCount,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { RawChannel, Channel, RawThreadMember, ThreadMember } from "../types/channel";
|
|
2
|
+
import { AttachmentRequest, RawAttachmentRequest } from "../types/message";
|
|
2
3
|
export declare class Channels {
|
|
3
4
|
static channelFromRaw(channel: RawChannel): Channel;
|
|
4
5
|
static channelToRaw(channel: Channel): RawChannel;
|
|
5
6
|
static threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
|
|
6
7
|
static threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
|
|
8
|
+
static attachmentRequestFromRaw(attachmentRequest: RawAttachmentRequest): AttachmentRequest;
|
|
9
|
+
static attachmentRequestToRaw(attachmentRequest: AttachmentRequest): RawAttachmentRequest;
|
|
7
10
|
}
|
|
@@ -49,6 +49,7 @@ class Channels {
|
|
|
49
49
|
: undefined,
|
|
50
50
|
defaultAutoArchiveDuration: channel.default_auto_archive_duration,
|
|
51
51
|
permissions: channel.permissions,
|
|
52
|
+
appPermissions: channel.app_permissions,
|
|
52
53
|
flags: channel.flags,
|
|
53
54
|
totalMessageSent: channel.total_message_sent,
|
|
54
55
|
availableTags: channel.available_tags?.map((availableTag) => ({
|
|
@@ -117,6 +118,7 @@ class Channels {
|
|
|
117
118
|
: undefined,
|
|
118
119
|
default_auto_archive_duration: channel.defaultAutoArchiveDuration,
|
|
119
120
|
permissions: channel.permissions,
|
|
121
|
+
app_permissions: channel.appPermissions,
|
|
120
122
|
flags: channel.flags,
|
|
121
123
|
total_message_sent: channel.totalMessageSent,
|
|
122
124
|
available_tags: channel.availableTags?.map((availableTag) => ({
|
|
@@ -162,5 +164,27 @@ class Channels {
|
|
|
162
164
|
: undefined,
|
|
163
165
|
};
|
|
164
166
|
}
|
|
167
|
+
static attachmentRequestFromRaw(attachmentRequest) {
|
|
168
|
+
return {
|
|
169
|
+
id: attachmentRequest.id,
|
|
170
|
+
filename: attachmentRequest.filename,
|
|
171
|
+
title: attachmentRequest.title,
|
|
172
|
+
description: attachmentRequest.description,
|
|
173
|
+
durationSecs: attachmentRequest.duration_secs,
|
|
174
|
+
waveform: attachmentRequest.waveform,
|
|
175
|
+
isSpoiler: attachmentRequest.is_spoiler,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
static attachmentRequestToRaw(attachmentRequest) {
|
|
179
|
+
return {
|
|
180
|
+
id: attachmentRequest.id,
|
|
181
|
+
filename: attachmentRequest.filename,
|
|
182
|
+
title: attachmentRequest.title,
|
|
183
|
+
description: attachmentRequest.description,
|
|
184
|
+
duration_secs: attachmentRequest.durationSecs,
|
|
185
|
+
waveform: attachmentRequest.waveform,
|
|
186
|
+
is_spoiler: attachmentRequest.isSpoiler,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
165
189
|
}
|
|
166
190
|
exports.Channels = Channels;
|
|
@@ -229,6 +229,7 @@ class Components {
|
|
|
229
229
|
minValues: fileUpload.min_values,
|
|
230
230
|
maxValues: fileUpload.max_values,
|
|
231
231
|
required: fileUpload.required,
|
|
232
|
+
fileTypes: fileUpload.file_types,
|
|
232
233
|
};
|
|
233
234
|
}
|
|
234
235
|
static fileUploadToRaw(fileUpload) {
|
|
@@ -239,6 +240,7 @@ class Components {
|
|
|
239
240
|
min_values: fileUpload.minValues,
|
|
240
241
|
max_values: fileUpload.maxValues,
|
|
241
242
|
required: fileUpload.required,
|
|
243
|
+
file_types: fileUpload.fileTypes,
|
|
242
244
|
};
|
|
243
245
|
}
|
|
244
246
|
static labelFromRaw(label) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Lobby, LobbyMember, RawLobby, RawLobbyMember } from "../types/lobby";
|
|
1
|
+
import type { Lobby, LobbyMember, LobbyMessage, RawLobby, RawLobbyMember, RawLobbyMessage } from "../types/lobby";
|
|
2
2
|
export declare class Lobbies {
|
|
3
3
|
static lobbyFromRaw(lobby: RawLobby): Lobby;
|
|
4
4
|
static lobbyMemberFromRaw(lobbyMember: RawLobbyMember): LobbyMember;
|
|
5
5
|
static lobbyMemberToRaw(lobbyMember: LobbyMember): RawLobbyMember;
|
|
6
|
+
static lobbyMessageFromRaw(lobbyMessage: RawLobbyMessage): LobbyMessage;
|
|
7
|
+
static lobbyMessageToRaw(lobbyMessage: LobbyMessage): RawLobbyMessage;
|
|
6
8
|
static lobbyToRaw(lobby: Lobby): RawLobby;
|
|
7
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Lobbies = void 0;
|
|
4
|
+
const Users_1 = require("./Users");
|
|
4
5
|
class Lobbies {
|
|
5
6
|
static lobbyFromRaw(lobby) {
|
|
6
7
|
return {
|
|
@@ -16,6 +17,7 @@ class Lobbies {
|
|
|
16
17
|
id: lobbyMember.id,
|
|
17
18
|
metadata: lobbyMember.metadata,
|
|
18
19
|
flags: lobbyMember.flags,
|
|
20
|
+
additionalName: lobbyMember.additional_name,
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
static lobbyMemberToRaw(lobbyMember) {
|
|
@@ -23,6 +25,35 @@ class Lobbies {
|
|
|
23
25
|
id: lobbyMember.id,
|
|
24
26
|
metadata: lobbyMember.metadata,
|
|
25
27
|
flags: lobbyMember.flags,
|
|
28
|
+
additional_name: lobbyMember.additionalName,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static lobbyMessageFromRaw(lobbyMessage) {
|
|
32
|
+
return {
|
|
33
|
+
id: lobbyMessage.id,
|
|
34
|
+
type: lobbyMessage.type,
|
|
35
|
+
content: lobbyMessage.content,
|
|
36
|
+
lobbyId: lobbyMessage.lobby_id,
|
|
37
|
+
channelId: lobbyMessage.channel_id,
|
|
38
|
+
author: Users_1.Users.userFromRaw(lobbyMessage.author),
|
|
39
|
+
metadata: lobbyMessage.metadata,
|
|
40
|
+
moderationMetadata: lobbyMessage.moderation_metadata,
|
|
41
|
+
flags: lobbyMessage.flags,
|
|
42
|
+
applicationId: lobbyMessage.application_id,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static lobbyMessageToRaw(lobbyMessage) {
|
|
46
|
+
return {
|
|
47
|
+
id: lobbyMessage.id,
|
|
48
|
+
type: lobbyMessage.type,
|
|
49
|
+
content: lobbyMessage.content,
|
|
50
|
+
lobby_id: lobbyMessage.lobbyId,
|
|
51
|
+
channel_id: lobbyMessage.channelId,
|
|
52
|
+
author: Users_1.Users.userToRaw(lobbyMessage.author),
|
|
53
|
+
metadata: lobbyMessage.metadata,
|
|
54
|
+
moderation_metadata: lobbyMessage.moderationMetadata,
|
|
55
|
+
flags: lobbyMessage.flags,
|
|
56
|
+
application_id: lobbyMessage.applicationId,
|
|
26
57
|
};
|
|
27
58
|
}
|
|
28
59
|
static lobbyToRaw(lobby) {
|
|
@@ -36,6 +36,7 @@ export interface RawApplicationCommandOption {
|
|
|
36
36
|
min_length?: number;
|
|
37
37
|
max_length?: number;
|
|
38
38
|
autocomplete?: boolean;
|
|
39
|
+
file_types?: Array<"image" | "video" | "audio" | string>;
|
|
39
40
|
}
|
|
40
41
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
|
|
41
42
|
export interface RawApplicationCommandOptionChoice {
|
|
@@ -92,6 +93,7 @@ export interface ApplicationCommandOption {
|
|
|
92
93
|
minLength?: number;
|
|
93
94
|
maxLength?: number;
|
|
94
95
|
autocomplete?: boolean;
|
|
96
|
+
fileTypes?: Array<"image" | "video" | "audio" | string>;
|
|
95
97
|
}
|
|
96
98
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
|
|
97
99
|
export interface ApplicationCommandOptionChoice {
|
|
@@ -23,6 +23,7 @@ export interface RawApplication {
|
|
|
23
23
|
slug?: string;
|
|
24
24
|
cover_image?: string;
|
|
25
25
|
flags?: ApplicationFlags;
|
|
26
|
+
flags_new?: string;
|
|
26
27
|
approximate_guild_count?: number;
|
|
27
28
|
approximate_user_install_count?: number;
|
|
28
29
|
approximate_user_authorization_count?: number;
|
|
@@ -81,6 +82,7 @@ export interface Application {
|
|
|
81
82
|
slug?: string;
|
|
82
83
|
coverImage?: string;
|
|
83
84
|
flags?: ApplicationFlags;
|
|
85
|
+
flagsNew?: string;
|
|
84
86
|
approximateGuildCount?: number;
|
|
85
87
|
approximateUserInstallCount?: number;
|
|
86
88
|
approximateUserAuthorizationCount?: number;
|
|
@@ -19,7 +19,7 @@ export interface RawChannel {
|
|
|
19
19
|
recipients?: Array<RawUser>;
|
|
20
20
|
icon?: string | null;
|
|
21
21
|
owner_id?: snowflake;
|
|
22
|
-
application_id?: snowflake;
|
|
22
|
+
application_id?: snowflake | null;
|
|
23
23
|
managed?: boolean;
|
|
24
24
|
parent_id?: snowflake | null;
|
|
25
25
|
last_pin_timestamp?: timestamp | null;
|
|
@@ -31,6 +31,7 @@ export interface RawChannel {
|
|
|
31
31
|
member?: RawThreadMember;
|
|
32
32
|
default_auto_archive_duration?: number;
|
|
33
33
|
permissions?: string;
|
|
34
|
+
app_permissions?: string;
|
|
34
35
|
flags?: ChannelFlags;
|
|
35
36
|
total_message_sent?: number;
|
|
36
37
|
available_tags?: Array<RawForumTag>;
|
|
@@ -99,7 +100,7 @@ export interface Channel {
|
|
|
99
100
|
recipients?: Array<User>;
|
|
100
101
|
icon?: string | null;
|
|
101
102
|
ownerId?: snowflake;
|
|
102
|
-
applicationId?: snowflake;
|
|
103
|
+
applicationId?: snowflake | null;
|
|
103
104
|
managed?: boolean;
|
|
104
105
|
parentId?: snowflake | null;
|
|
105
106
|
lastPinTimestamp?: timestamp | null;
|
|
@@ -111,6 +112,7 @@ export interface Channel {
|
|
|
111
112
|
member?: ThreadMember;
|
|
112
113
|
defaultAutoArchiveDuration?: number;
|
|
113
114
|
permissions?: string;
|
|
115
|
+
appPermissions?: string;
|
|
114
116
|
flags?: ChannelFlags;
|
|
115
117
|
totalMessageSent?: number;
|
|
116
118
|
availableTags?: Array<ForumTag>;
|
|
@@ -15,7 +15,7 @@ export interface RawButton {
|
|
|
15
15
|
style: ButtonStyles;
|
|
16
16
|
label?: string;
|
|
17
17
|
emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
|
|
18
|
-
custom_id
|
|
18
|
+
custom_id?: string;
|
|
19
19
|
sku_id?: snowflake;
|
|
20
20
|
url?: string;
|
|
21
21
|
disabled?: boolean;
|
|
@@ -238,6 +238,7 @@ export interface RawFileUpload {
|
|
|
238
238
|
min_values?: number;
|
|
239
239
|
max_values?: number;
|
|
240
240
|
required?: boolean;
|
|
241
|
+
file_types?: Array<"image" | "video" | "audio" | string>;
|
|
241
242
|
}
|
|
242
243
|
/** https://discord.com/developers/docs/components/reference#file-upload-file-upload-interaction-response-structure */
|
|
243
244
|
export interface RawFileUploadInteractionResponse {
|
|
@@ -331,7 +332,7 @@ export interface Button {
|
|
|
331
332
|
style: ButtonStyles;
|
|
332
333
|
label?: string;
|
|
333
334
|
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
|
334
|
-
customId
|
|
335
|
+
customId?: string;
|
|
335
336
|
skuId?: snowflake;
|
|
336
337
|
url?: string;
|
|
337
338
|
disabled?: boolean;
|
|
@@ -554,6 +555,7 @@ export interface FileUpload {
|
|
|
554
555
|
minValues?: number;
|
|
555
556
|
maxValues?: number;
|
|
556
557
|
required?: boolean;
|
|
558
|
+
fileTypes?: Array<"image" | "video" | "audio" | string>;
|
|
557
559
|
}
|
|
558
560
|
/** https://discord.com/developers/docs/components/reference#file-upload-file-upload-interaction-response-structure */
|
|
559
561
|
export interface FileUploadInteractionResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivityFlags, ActivityType, AnimationTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
|
1
|
+
import type { ActivityFlags, ActivityType, AnimationTypes, ChannelTypes, GatewayCapabilities, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
|
2
2
|
import type { RawApplication, Application } from "./application";
|
|
3
3
|
import type { RawAutoModerationAction, AutoModerationAction } from "./auto-moderation";
|
|
4
4
|
import type { RawChannel, RawThreadMember, Channel, ThreadMember } from "./channel";
|
|
@@ -28,6 +28,7 @@ export interface RawIdentify {
|
|
|
28
28
|
shard?: [number, number];
|
|
29
29
|
presence?: Partial<Pick<RawGatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
|
30
30
|
intents: GatewayIntents;
|
|
31
|
+
capabilities?: GatewayCapabilities;
|
|
31
32
|
}
|
|
32
33
|
/** https://discord.com/developers/docs/events/gateway-events#identify-identify-connection-properties */
|
|
33
34
|
export interface RawIdentifyConnectionProperties {
|
|
@@ -81,7 +82,7 @@ export interface RawReadyEvent {
|
|
|
81
82
|
session_id: string;
|
|
82
83
|
resume_gateway_url: string;
|
|
83
84
|
shard?: [number, number];
|
|
84
|
-
application: Pick<RawApplication, "id" | "flags">;
|
|
85
|
+
application: Pick<RawApplication, "id" | "flags" | "flags_new">;
|
|
85
86
|
}
|
|
86
87
|
/** https://discord.com/developers/docs/events/gateway-events#auto-moderation-action-execution-auto-moderation-action-execution-event-fields */
|
|
87
88
|
export interface RawAutoModerationActionExecutionEvent {
|
|
@@ -309,6 +310,7 @@ export interface RawMessageCreateEventExtra {
|
|
|
309
310
|
guild_id?: snowflake;
|
|
310
311
|
member?: RawGuildMember;
|
|
311
312
|
mentions: Array<RawUser>;
|
|
313
|
+
channel_type?: ChannelTypes;
|
|
312
314
|
}
|
|
313
315
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
314
316
|
export interface RawMessageDeleteEvent {
|
|
@@ -371,6 +373,7 @@ export interface RawClientStatus {
|
|
|
371
373
|
desktop?: string;
|
|
372
374
|
mobile?: string;
|
|
373
375
|
web?: string;
|
|
376
|
+
vr?: string;
|
|
374
377
|
}
|
|
375
378
|
/** https://discord.com/developers/docs/events/gateway-events#activity-object-activity-structure */
|
|
376
379
|
export interface RawActivity {
|
|
@@ -497,6 +500,7 @@ export interface Identify {
|
|
|
497
500
|
shard?: [number, number];
|
|
498
501
|
presence?: Partial<Pick<GatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
|
499
502
|
intents: GatewayIntents;
|
|
503
|
+
capabilities?: GatewayCapabilities;
|
|
500
504
|
}
|
|
501
505
|
/** https://discord.com/developers/docs/events/gateway-events#identify-identify-connection-properties */
|
|
502
506
|
export interface IdentifyConnectionProperties {
|
|
@@ -550,7 +554,7 @@ export interface ReadyEvent {
|
|
|
550
554
|
sessionId: string;
|
|
551
555
|
resumeGatewayURL: string;
|
|
552
556
|
shard?: [number, number];
|
|
553
|
-
application: Pick<Application, "id" | "flags">;
|
|
557
|
+
application: Pick<Application, "id" | "flags" | "flagsNew">;
|
|
554
558
|
}
|
|
555
559
|
/** https://discord.com/developers/docs/events/gateway-events#auto-moderation-action-execution-auto-moderation-action-execution-event-fields */
|
|
556
560
|
export interface AutoModerationActionExecutionEvent {
|
|
@@ -778,6 +782,7 @@ export interface MessageCreateEventExtra {
|
|
|
778
782
|
guildId?: snowflake;
|
|
779
783
|
member?: GuildMember;
|
|
780
784
|
mentions: Array<User>;
|
|
785
|
+
channelType?: ChannelTypes;
|
|
781
786
|
}
|
|
782
787
|
/** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
|
|
783
788
|
export interface MessageDeleteEvent {
|
|
@@ -840,6 +845,7 @@ export interface ClientStatus {
|
|
|
840
845
|
desktop?: string;
|
|
841
846
|
mobile?: string;
|
|
842
847
|
web?: string;
|
|
848
|
+
vr?: string;
|
|
843
849
|
}
|
|
844
850
|
/** https://discord.com/developers/docs/events/gateway-events#activity-object-activity-structure */
|
|
845
851
|
export interface Activity {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { LobbyMemberFlags } from "../constants";
|
|
1
|
+
import type { LobbyMemberFlags, MessageFlags, MessageTypes } from "../constants";
|
|
2
2
|
import type { RawChannel } from "./channel";
|
|
3
3
|
import type { snowflake } from "./common";
|
|
4
|
+
import { RawUser, User } from "./user";
|
|
4
5
|
/** https://discord.com/developers/docs/resources/lobby#lobby-object */
|
|
5
6
|
export interface RawLobby {
|
|
6
7
|
id: snowflake;
|
|
@@ -14,6 +15,24 @@ export interface RawLobbyMember {
|
|
|
14
15
|
id: snowflake;
|
|
15
16
|
metadata?: Record<string, string> | null;
|
|
16
17
|
flags?: LobbyMemberFlags;
|
|
18
|
+
additional_name?: string;
|
|
19
|
+
}
|
|
20
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
21
|
+
export interface RawLobbyMessage {
|
|
22
|
+
id: snowflake;
|
|
23
|
+
type: MessageTypes;
|
|
24
|
+
content: string;
|
|
25
|
+
lobby_id: snowflake;
|
|
26
|
+
channel_id: snowflake;
|
|
27
|
+
author: RawUser;
|
|
28
|
+
metadata?: Record<string, string> | null;
|
|
29
|
+
moderation_metadata?: Record<string, string> | null;
|
|
30
|
+
flags: MessageFlags;
|
|
31
|
+
application_id: snowflake;
|
|
32
|
+
}
|
|
33
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
34
|
+
export interface RawLobbyInvite {
|
|
35
|
+
code: string;
|
|
17
36
|
}
|
|
18
37
|
/** https://discord.com/developers/docs/resources/lobby#lobby-object */
|
|
19
38
|
export interface Lobby {
|
|
@@ -28,4 +47,22 @@ export interface LobbyMember {
|
|
|
28
47
|
id: snowflake;
|
|
29
48
|
metadata?: Record<string, string> | null;
|
|
30
49
|
flags?: LobbyMemberFlags;
|
|
50
|
+
additionalName?: string;
|
|
51
|
+
}
|
|
52
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
53
|
+
export interface LobbyMessage {
|
|
54
|
+
id: snowflake;
|
|
55
|
+
type: MessageTypes;
|
|
56
|
+
content: string;
|
|
57
|
+
lobbyId: snowflake;
|
|
58
|
+
channelId: snowflake;
|
|
59
|
+
author: User;
|
|
60
|
+
metadata?: Record<string, string> | null;
|
|
61
|
+
moderationMetadata?: Record<string, string> | null;
|
|
62
|
+
flags: MessageFlags;
|
|
63
|
+
applicationId: snowflake;
|
|
64
|
+
}
|
|
65
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
|
|
66
|
+
export interface LobbyInvite {
|
|
67
|
+
code: string;
|
|
31
68
|
}
|