From 72577c4bfd02524a27afb6ff4aebba9301a690d3 Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Tue, 15 Mar 2022 16:37:07 -0400 Subject: [PATCH] feat: add API v10 support (#7477) * feat: add API v10 support * refactor: update deps * chore: rebase fixes --- README.md | 2 +- .../__tests__/components/actionRow.test.ts | 2 +- .../__tests__/components/button.test.ts | 2 +- .../__tests__/components/selectMenu.test.ts | 2 +- .../__tests__/components/textInput.test.ts | 2 +- .../SlashCommands/Options.test.ts | 2 +- .../SlashCommands/SlashCommands.test.ts | 2 +- .../__tests__/interactions/modal.test.ts | 2 +- packages/builders/package.json | 2 +- packages/builders/src/components/ActionRow.ts | 2 +- .../builders/src/components/Assertions.ts | 2 +- packages/builders/src/components/Component.ts | 2 +- .../builders/src/components/Components.ts | 2 +- .../builders/src/components/button/Button.ts | 2 +- .../src/components/button/UnsafeButton.ts | 2 +- .../src/components/selectMenu/SelectMenu.ts | 2 +- .../components/selectMenu/SelectMenuOption.ts | 2 +- .../components/selectMenu/UnsafeSelectMenu.ts | 2 +- .../selectMenu/UnsafeSelectMenuOption.ts | 2 +- .../src/components/textInput/Assertions.ts | 2 +- .../src/components/textInput/TextInput.ts | 2 +- .../components/textInput/UnsafeTextInput.ts | 2 +- .../contextMenuCommands/Assertions.ts | 2 +- .../ContextMenuCommandBuilder.ts | 2 +- .../builders/src/interactions/modals/Modal.ts | 2 +- .../src/interactions/modals/UnsafeModal.ts | 2 +- .../interactions/slashCommands/Assertions.ts | 2 +- .../slashCommands/SlashCommandBuilder.ts | 2 +- .../slashCommands/SlashCommandSubcommands.ts | 2 +- .../mixins/ApplicationCommandOptionBase.ts | 2 +- ...plicationCommandOptionChannelTypesMixin.ts | 2 +- ...ndOptionWithChoicesAndAutocompleteMixin.ts | 2 +- .../slashCommands/options/attachment.ts | 2 +- .../slashCommands/options/boolean.ts | 2 +- .../slashCommands/options/channel.ts | 2 +- .../slashCommands/options/integer.ts | 2 +- .../slashCommands/options/mentionable.ts | 2 +- .../slashCommands/options/number.ts | 2 +- .../slashCommands/options/role.ts | 2 +- .../slashCommands/options/string.ts | 2 +- .../slashCommands/options/user.ts | 2 +- .../builders/src/messages/embed/Assertions.ts | 2 +- packages/builders/src/messages/embed/Embed.ts | 2 +- .../src/messages/embed/UnsafeEmbed.ts | 2 +- packages/builders/src/util/componentUtil.ts | 2 +- packages/discord.js/README.md | 2 +- packages/discord.js/package.json | 2 +- packages/discord.js/src/client/Client.js | 2 +- .../src/client/actions/InteractionCreate.js | 2 +- .../src/client/websocket/WebSocketManager.js | 2 +- .../src/client/websocket/WebSocketShard.js | 2 +- packages/discord.js/src/index.js | 72 +++++++++---------- .../src/managers/ApplicationCommandManager.js | 2 +- .../ApplicationCommandPermissionsManager.js | 2 +- .../discord.js/src/managers/ChannelManager.js | 2 +- .../src/managers/GuildBanManager.js | 2 +- .../src/managers/GuildChannelManager.js | 2 +- .../src/managers/GuildEmojiManager.js | 2 +- .../src/managers/GuildInviteManager.js | 2 +- .../discord.js/src/managers/GuildManager.js | 2 +- .../src/managers/GuildMemberManager.js | 2 +- .../src/managers/GuildMemberRoleManager.js | 2 +- .../managers/GuildScheduledEventManager.js | 2 +- .../src/managers/GuildStickerManager.js | 2 +- .../discord.js/src/managers/MessageManager.js | 2 +- .../managers/PermissionOverwriteManager.js | 2 +- .../src/managers/ReactionManager.js | 2 +- .../src/managers/ReactionUserManager.js | 2 +- .../discord.js/src/managers/RoleManager.js | 2 +- .../src/managers/StageInstanceManager.js | 2 +- .../discord.js/src/managers/ThreadManager.js | 2 +- .../src/managers/ThreadMemberManager.js | 2 +- .../discord.js/src/managers/UserManager.js | 2 +- .../src/structures/ApplicationCommand.js | 2 +- .../src/structures/AutocompleteInteraction.js | 2 +- .../discord.js/src/structures/BaseGuild.js | 2 +- .../src/structures/BaseGuildVoiceChannel.js | 2 +- packages/discord.js/src/structures/Channel.js | 2 +- .../src/structures/ClientApplication.js | 2 +- .../src/structures/ClientPresence.js | 2 +- .../discord.js/src/structures/ClientUser.js | 2 +- .../CommandInteractionOptionResolver.js | 2 +- .../ContextMenuCommandInteraction.js | 2 +- .../discord.js/src/structures/DMChannel.js | 2 +- packages/discord.js/src/structures/Guild.js | 2 +- .../src/structures/GuildAuditLogs.js | 2 +- .../discord.js/src/structures/GuildChannel.js | 2 +- .../discord.js/src/structures/GuildEmoji.js | 2 +- .../discord.js/src/structures/GuildMember.js | 2 +- .../discord.js/src/structures/GuildPreview.js | 2 +- .../src/structures/GuildScheduledEvent.js | 2 +- .../src/structures/GuildTemplate.js | 2 +- .../discord.js/src/structures/Integration.js | 2 +- .../discord.js/src/structures/Interaction.js | 2 +- packages/discord.js/src/structures/Invite.js | 2 +- packages/discord.js/src/structures/Message.js | 2 +- .../src/structures/MessagePayload.js | 2 +- .../src/structures/MessageReaction.js | 2 +- .../structures/ModalSubmitFieldsResolver.js | 2 +- .../discord.js/src/structures/NewsChannel.js | 2 +- .../src/structures/PermissionOverwrites.js | 2 +- packages/discord.js/src/structures/Role.js | 2 +- packages/discord.js/src/structures/Sticker.js | 2 +- .../src/structures/ThreadChannel.js | 2 +- .../discord.js/src/structures/VoiceChannel.js | 2 +- .../discord.js/src/structures/VoiceState.js | 2 +- packages/discord.js/src/structures/Webhook.js | 2 +- packages/discord.js/src/structures/Widget.js | 2 +- .../interfaces/InteractionResponses.js | 2 +- .../structures/interfaces/TextBasedChannel.js | 2 +- .../src/util/ActivityFlagsBitField.js | 2 +- .../src/util/ApplicationFlagsBitField.js | 2 +- packages/discord.js/src/util/Components.js | 2 +- packages/discord.js/src/util/Constants.js | 2 +- packages/discord.js/src/util/EnumResolvers.js | 2 +- .../discord.js/src/util/IntentsBitField.js | 2 +- .../src/util/MessageFlagsBitField.js | 2 +- .../src/util/PermissionsBitField.js | 2 +- .../src/util/SystemChannelFlagsBitField.js | 2 +- .../discord.js/src/util/UserFlagsBitField.js | 2 +- packages/discord.js/src/util/Util.js | 2 +- packages/discord.js/test/createGuild.js | 2 +- packages/discord.js/test/random.js | 2 +- .../test/reactionCollectorCreated.test.js | 2 +- packages/discord.js/test/sendtest.js | 2 +- packages/discord.js/test/shard.js | 2 +- packages/discord.js/test/tester1000.js | 2 +- packages/discord.js/test/tester2000.js | 2 +- packages/discord.js/test/webhooktest.js | 2 +- packages/discord.js/typings/index.d.ts | 4 +- packages/discord.js/typings/index.test-d.ts | 2 +- packages/discord.js/typings/rawDataTypes.d.ts | 2 +- .../rest/__tests__/DiscordAPIError.test.ts | 20 +++--- packages/rest/__tests__/REST.test.ts | 2 +- packages/rest/package.json | 2 +- packages/rest/src/lib/utils/constants.ts | 2 +- packages/rest/src/lib/utils/utils.ts | 2 +- packages/voice/__tests__/DataStore.test.ts | 2 +- packages/voice/examples/basic/adapter.ts | 2 +- packages/voice/package.json | 2 +- packages/voice/src/DataStore.ts | 2 +- packages/voice/src/VoiceConnection.ts | 2 +- packages/voice/src/util/adapter.ts | 2 +- yarn.lock | 23 +++--- 144 files changed, 196 insertions(+), 203 deletions(-) diff --git a/README.md b/README.md index 0953398614de..a6d211da0986 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Register a slash command against the Discord API: ```js const { REST } = require('@discordjs/rest'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const commands = [ { diff --git a/packages/builders/__tests__/components/actionRow.test.ts b/packages/builders/__tests__/components/actionRow.test.ts index f44841b05a9e..39cc1e1a3e5a 100644 --- a/packages/builders/__tests__/components/actionRow.test.ts +++ b/packages/builders/__tests__/components/actionRow.test.ts @@ -1,4 +1,4 @@ -import { APIActionRowComponent, APIMessageActionRowComponent, ButtonStyle, ComponentType } from 'discord-api-types/v9'; +import { APIActionRowComponent, APIMessageActionRowComponent, ButtonStyle, ComponentType } from 'discord-api-types/v10'; import { ActionRowBuilder, ButtonBuilder, diff --git a/packages/builders/__tests__/components/button.test.ts b/packages/builders/__tests__/components/button.test.ts index 897a7f8021f1..a2ec9fd740fe 100644 --- a/packages/builders/__tests__/components/button.test.ts +++ b/packages/builders/__tests__/components/button.test.ts @@ -3,7 +3,7 @@ import { APIButtonComponentWithURL, ButtonStyle, ComponentType, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { buttonLabelValidator, buttonStyleValidator } from '../../src/components/Assertions'; import { ButtonBuilder } from '../../src/components/button/Button'; diff --git a/packages/builders/__tests__/components/selectMenu.test.ts b/packages/builders/__tests__/components/selectMenu.test.ts index cbaa3af79853..5ea2fdae414c 100644 --- a/packages/builders/__tests__/components/selectMenu.test.ts +++ b/packages/builders/__tests__/components/selectMenu.test.ts @@ -1,4 +1,4 @@ -import { APISelectMenuComponent, APISelectMenuOption, ComponentType } from 'discord-api-types/v9'; +import { APISelectMenuComponent, APISelectMenuOption, ComponentType } from 'discord-api-types/v10'; import { SelectMenuBuilder, SelectMenuOptionBuilder } from '../../src/index'; const selectMenu = () => new SelectMenuBuilder(); diff --git a/packages/builders/__tests__/components/textInput.test.ts b/packages/builders/__tests__/components/textInput.test.ts index 0a04e722c567..bbd409b62c97 100644 --- a/packages/builders/__tests__/components/textInput.test.ts +++ b/packages/builders/__tests__/components/textInput.test.ts @@ -1,4 +1,4 @@ -import { APITextInputComponent, ComponentType, TextInputStyle } from 'discord-api-types/v9'; +import { APITextInputComponent, ComponentType, TextInputStyle } from 'discord-api-types/v10'; import { labelValidator, maxLengthValidator, diff --git a/packages/builders/__tests__/interactions/SlashCommands/Options.test.ts b/packages/builders/__tests__/interactions/SlashCommands/Options.test.ts index 6f4c8756c2ec..a9b5511bedbb 100644 --- a/packages/builders/__tests__/interactions/SlashCommands/Options.test.ts +++ b/packages/builders/__tests__/interactions/SlashCommands/Options.test.ts @@ -9,7 +9,7 @@ import { APIApplicationCommandUserOption, ApplicationCommandOptionType, ChannelType, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { SlashCommandBooleanOption, SlashCommandChannelOption, diff --git a/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts b/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts index d9559417cac6..41038943f38a 100644 --- a/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts +++ b/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandOptionChoice, ChannelType } from 'discord-api-types/v9'; +import { APIApplicationCommandOptionChoice, ChannelType } from 'discord-api-types/v10'; import { SlashCommandAssertions, SlashCommandBooleanOption, diff --git a/packages/builders/__tests__/interactions/modal.test.ts b/packages/builders/__tests__/interactions/modal.test.ts index 7638d43ca045..002fc7295d8d 100644 --- a/packages/builders/__tests__/interactions/modal.test.ts +++ b/packages/builders/__tests__/interactions/modal.test.ts @@ -1,4 +1,4 @@ -import { APIModalInteractionResponseCallbackData, ComponentType, TextInputStyle } from 'discord-api-types/v9'; +import { APIModalInteractionResponseCallbackData, ComponentType, TextInputStyle } from 'discord-api-types/v10'; import { ActionRowBuilder, ButtonBuilder, diff --git a/packages/builders/package.json b/packages/builders/package.json index 04f9f9ede438..519c5de99be9 100644 --- a/packages/builders/package.json +++ b/packages/builders/package.json @@ -53,7 +53,7 @@ "homepage": "https://discord.js.org", "dependencies": { "@sindresorhus/is": "^4.4.0", - "discord-api-types": "^0.27.3", + "discord-api-types": "^0.29.0", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.0", "tslib": "^2.3.1", diff --git a/packages/builders/src/components/ActionRow.ts b/packages/builders/src/components/ActionRow.ts index 0b7108367537..1ad4c06ea5e0 100644 --- a/packages/builders/src/components/ActionRow.ts +++ b/packages/builders/src/components/ActionRow.ts @@ -3,7 +3,7 @@ import { ComponentType, APIMessageActionRowComponent, APIModalActionRowComponent, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import type { ButtonBuilder, SelectMenuBuilder, TextInputBuilder } from '..'; import { ComponentBuilder } from './Component'; import { createComponentBuilder } from './Components'; diff --git a/packages/builders/src/components/Assertions.ts b/packages/builders/src/components/Assertions.ts index f70017571c17..79e9ea632427 100644 --- a/packages/builders/src/components/Assertions.ts +++ b/packages/builders/src/components/Assertions.ts @@ -1,4 +1,4 @@ -import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v9'; +import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v10'; import { z } from 'zod'; import type { SelectMenuOptionBuilder } from './selectMenu/SelectMenuOption'; diff --git a/packages/builders/src/components/Component.ts b/packages/builders/src/components/Component.ts index 318deb5030f5..eca853e5fe7c 100644 --- a/packages/builders/src/components/Component.ts +++ b/packages/builders/src/components/Component.ts @@ -8,7 +8,7 @@ import type { APIModalActionRowComponent, APIModalComponent, ComponentType, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; /** * Represents a discord component diff --git a/packages/builders/src/components/Components.ts b/packages/builders/src/components/Components.ts index 266d512c6012..aaf4d38d1b5a 100644 --- a/packages/builders/src/components/Components.ts +++ b/packages/builders/src/components/Components.ts @@ -1,4 +1,4 @@ -import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v9'; +import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10'; import { ActionRowBuilder, ButtonBuilder, ComponentBuilder, SelectMenuBuilder, TextInputBuilder } from '../index'; import type { MessageComponentBuilder, ModalComponentBuilder } from './ActionRow'; diff --git a/packages/builders/src/components/button/Button.ts b/packages/builders/src/components/button/Button.ts index de7a4808d502..5e6f869dacb5 100644 --- a/packages/builders/src/components/button/Button.ts +++ b/packages/builders/src/components/button/Button.ts @@ -4,7 +4,7 @@ import type { APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { buttonLabelValidator, buttonStyleValidator, diff --git a/packages/builders/src/components/button/UnsafeButton.ts b/packages/builders/src/components/button/UnsafeButton.ts index 9c5e5ec71cf0..be79c1e3540e 100644 --- a/packages/builders/src/components/button/UnsafeButton.ts +++ b/packages/builders/src/components/button/UnsafeButton.ts @@ -5,7 +5,7 @@ import { type APIButtonComponent, type APIButtonComponentWithURL, type APIButtonComponentWithCustomId, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { ComponentBuilder } from '../Component'; /** diff --git a/packages/builders/src/components/selectMenu/SelectMenu.ts b/packages/builders/src/components/selectMenu/SelectMenu.ts index 55a6589480bb..3f10f7dd0967 100644 --- a/packages/builders/src/components/selectMenu/SelectMenu.ts +++ b/packages/builders/src/components/selectMenu/SelectMenu.ts @@ -1,4 +1,4 @@ -import type { APISelectMenuComponent } from 'discord-api-types/v9'; +import type { APISelectMenuComponent } from 'discord-api-types/v10'; import { customIdValidator, disabledValidator, diff --git a/packages/builders/src/components/selectMenu/SelectMenuOption.ts b/packages/builders/src/components/selectMenu/SelectMenuOption.ts index f861a966ab17..7399406f7728 100644 --- a/packages/builders/src/components/selectMenu/SelectMenuOption.ts +++ b/packages/builders/src/components/selectMenu/SelectMenuOption.ts @@ -1,4 +1,4 @@ -import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v9'; +import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10'; import { defaultValidator, emojiValidator, diff --git a/packages/builders/src/components/selectMenu/UnsafeSelectMenu.ts b/packages/builders/src/components/selectMenu/UnsafeSelectMenu.ts index 2a33ec879be5..fa61cc73e73f 100644 --- a/packages/builders/src/components/selectMenu/UnsafeSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/UnsafeSelectMenu.ts @@ -1,4 +1,4 @@ -import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v9'; +import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v10'; import { ComponentBuilder } from '../Component'; import { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption'; diff --git a/packages/builders/src/components/selectMenu/UnsafeSelectMenuOption.ts b/packages/builders/src/components/selectMenu/UnsafeSelectMenuOption.ts index 8cf0f1196998..fea1076ec043 100644 --- a/packages/builders/src/components/selectMenu/UnsafeSelectMenuOption.ts +++ b/packages/builders/src/components/selectMenu/UnsafeSelectMenuOption.ts @@ -1,4 +1,4 @@ -import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v9'; +import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10'; /** * Represents a non-validated option within a select menu component diff --git a/packages/builders/src/components/textInput/Assertions.ts b/packages/builders/src/components/textInput/Assertions.ts index 2b8ae2a2d397..58b2d5ed4fa3 100644 --- a/packages/builders/src/components/textInput/Assertions.ts +++ b/packages/builders/src/components/textInput/Assertions.ts @@ -1,4 +1,4 @@ -import { TextInputStyle } from 'discord-api-types/v9'; +import { TextInputStyle } from 'discord-api-types/v10'; import { z } from 'zod'; import { customIdValidator } from '../Assertions'; diff --git a/packages/builders/src/components/textInput/TextInput.ts b/packages/builders/src/components/textInput/TextInput.ts index ee70d9b0b5a0..a0ec9ef3d6c5 100644 --- a/packages/builders/src/components/textInput/TextInput.ts +++ b/packages/builders/src/components/textInput/TextInput.ts @@ -1,4 +1,4 @@ -import type { APITextInputComponent } from 'discord-api-types/v9'; +import type { APITextInputComponent } from 'discord-api-types/v10'; import { maxLengthValidator, minLengthValidator, diff --git a/packages/builders/src/components/textInput/UnsafeTextInput.ts b/packages/builders/src/components/textInput/UnsafeTextInput.ts index 5b4af9f3f532..ab4546aad3e1 100644 --- a/packages/builders/src/components/textInput/UnsafeTextInput.ts +++ b/packages/builders/src/components/textInput/UnsafeTextInput.ts @@ -1,4 +1,4 @@ -import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v9'; +import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10'; import { ComponentBuilder } from '../../index'; import isEqual from 'fast-deep-equal'; diff --git a/packages/builders/src/interactions/contextMenuCommands/Assertions.ts b/packages/builders/src/interactions/contextMenuCommands/Assertions.ts index f2f5e2e3dda1..eba1a65f1ca8 100644 --- a/packages/builders/src/interactions/contextMenuCommands/Assertions.ts +++ b/packages/builders/src/interactions/contextMenuCommands/Assertions.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { ApplicationCommandType } from 'discord-api-types/v9'; +import { ApplicationCommandType } from 'discord-api-types/v10'; import type { ContextMenuCommandType } from './ContextMenuCommandBuilder'; const namePredicate = z diff --git a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts index c1e88fd08446..36fefa0805df 100644 --- a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +++ b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts @@ -1,5 +1,5 @@ import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions'; -import type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9'; +import type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10'; export class ContextMenuCommandBuilder { /** diff --git a/packages/builders/src/interactions/modals/Modal.ts b/packages/builders/src/interactions/modals/Modal.ts index 3e305ac70cf6..cf8d7d5d503e 100644 --- a/packages/builders/src/interactions/modals/Modal.ts +++ b/packages/builders/src/interactions/modals/Modal.ts @@ -1,4 +1,4 @@ -import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v9'; +import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v10'; import { customIdValidator } from '../../components/Assertions'; import { titleValidator, validateRequiredParameters } from './Assertions'; import { UnsafeModalBuilder } from './UnsafeModal'; diff --git a/packages/builders/src/interactions/modals/UnsafeModal.ts b/packages/builders/src/interactions/modals/UnsafeModal.ts index 6a305b393486..f70619dff4d5 100644 --- a/packages/builders/src/interactions/modals/UnsafeModal.ts +++ b/packages/builders/src/interactions/modals/UnsafeModal.ts @@ -2,7 +2,7 @@ import type { APIActionRowComponent, APIModalActionRowComponent, APIModalInteractionResponseCallbackData, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { ActionRowBuilder, createComponentBuilder, JSONEncodable, ModalActionRowComponentBuilder } from '../../index'; export class UnsafeModalBuilder implements JSONEncodable { diff --git a/packages/builders/src/interactions/slashCommands/Assertions.ts b/packages/builders/src/interactions/slashCommands/Assertions.ts index 6530d5083e85..9ce5467e1b5f 100644 --- a/packages/builders/src/interactions/slashCommands/Assertions.ts +++ b/packages/builders/src/interactions/slashCommands/Assertions.ts @@ -1,5 +1,5 @@ import is from '@sindresorhus/is'; -import type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9'; +import type { APIApplicationCommandOptionChoice } from 'discord-api-types/v10'; import { z } from 'zod'; import type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase'; import type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder'; diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts index c108c58898e9..46ab3c7d1f47 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts @@ -1,4 +1,4 @@ -import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9'; +import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { assertReturnOfBuilder, diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts b/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts index c762f6857bd9..c4e249501731 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts @@ -2,7 +2,7 @@ import { APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, ApplicationCommandOptionType, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions'; import type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase'; diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts index 27aa522552c7..d65c98d95baa 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts @@ -1,4 +1,4 @@ -import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { validateRequiredParameters, validateRequired } from '../Assertions'; import { SharedNameAndDescription } from './NameAndDescription'; diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts index 34253368a080..382cf7211af0 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts @@ -1,4 +1,4 @@ -import { ChannelType } from 'discord-api-types/v9'; +import { ChannelType } from 'discord-api-types/v10'; import { z, ZodLiteral } from 'zod'; // Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime) diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts index 53e8b56402bc..d6bc14a2eec5 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { z } from 'zod'; import { validateChoicesLength } from '../Assertions'; diff --git a/packages/builders/src/interactions/slashCommands/options/attachment.ts b/packages/builders/src/interactions/slashCommands/options/attachment.ts index b1d486593b1b..e590e46292f1 100644 --- a/packages/builders/src/interactions/slashCommands/options/attachment.ts +++ b/packages/builders/src/interactions/slashCommands/options/attachment.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; export class SlashCommandAttachmentOption extends ApplicationCommandOptionBase { diff --git a/packages/builders/src/interactions/slashCommands/options/boolean.ts b/packages/builders/src/interactions/slashCommands/options/boolean.ts index ae8a1d257428..0faaee592429 100644 --- a/packages/builders/src/interactions/slashCommands/options/boolean.ts +++ b/packages/builders/src/interactions/slashCommands/options/boolean.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; export class SlashCommandBooleanOption extends ApplicationCommandOptionBase { diff --git a/packages/builders/src/interactions/slashCommands/options/channel.ts b/packages/builders/src/interactions/slashCommands/options/channel.ts index 5bd67f19f02a..1e5111aef90d 100644 --- a/packages/builders/src/interactions/slashCommands/options/channel.ts +++ b/packages/builders/src/interactions/slashCommands/options/channel.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; import { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin'; diff --git a/packages/builders/src/interactions/slashCommands/options/integer.ts b/packages/builders/src/interactions/slashCommands/options/integer.ts index 5759a9ec1022..ec8bf52df31d 100644 --- a/packages/builders/src/interactions/slashCommands/options/integer.ts +++ b/packages/builders/src/interactions/slashCommands/options/integer.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { z } from 'zod'; import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin'; diff --git a/packages/builders/src/interactions/slashCommands/options/mentionable.ts b/packages/builders/src/interactions/slashCommands/options/mentionable.ts index be2c110e9cb0..be7416f1437c 100644 --- a/packages/builders/src/interactions/slashCommands/options/mentionable.ts +++ b/packages/builders/src/interactions/slashCommands/options/mentionable.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; export class SlashCommandMentionableOption extends ApplicationCommandOptionBase { diff --git a/packages/builders/src/interactions/slashCommands/options/number.ts b/packages/builders/src/interactions/slashCommands/options/number.ts index cc55ced5bbfd..ff843e384778 100644 --- a/packages/builders/src/interactions/slashCommands/options/number.ts +++ b/packages/builders/src/interactions/slashCommands/options/number.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { z } from 'zod'; import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin'; diff --git a/packages/builders/src/interactions/slashCommands/options/role.ts b/packages/builders/src/interactions/slashCommands/options/role.ts index 5f2a3825f77d..85dc376536cf 100644 --- a/packages/builders/src/interactions/slashCommands/options/role.ts +++ b/packages/builders/src/interactions/slashCommands/options/role.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; export class SlashCommandRoleOption extends ApplicationCommandOptionBase { diff --git a/packages/builders/src/interactions/slashCommands/options/string.ts b/packages/builders/src/interactions/slashCommands/options/string.ts index 4f127f0a5931..1d6f667480df 100644 --- a/packages/builders/src/interactions/slashCommands/options/string.ts +++ b/packages/builders/src/interactions/slashCommands/options/string.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { mix } from 'ts-mixer'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin'; diff --git a/packages/builders/src/interactions/slashCommands/options/user.ts b/packages/builders/src/interactions/slashCommands/options/user.ts index 0d5327fc6b41..9a750067daba 100644 --- a/packages/builders/src/interactions/slashCommands/options/user.ts +++ b/packages/builders/src/interactions/slashCommands/options/user.ts @@ -1,4 +1,4 @@ -import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase'; export class SlashCommandUserOption extends ApplicationCommandOptionBase { diff --git a/packages/builders/src/messages/embed/Assertions.ts b/packages/builders/src/messages/embed/Assertions.ts index b863c6ddf149..442ad10c08db 100644 --- a/packages/builders/src/messages/embed/Assertions.ts +++ b/packages/builders/src/messages/embed/Assertions.ts @@ -1,4 +1,4 @@ -import type { APIEmbedField } from 'discord-api-types/v9'; +import type { APIEmbedField } from 'discord-api-types/v10'; import { z } from 'zod'; export const fieldNamePredicate = z.string().min(1).max(256); diff --git a/packages/builders/src/messages/embed/Embed.ts b/packages/builders/src/messages/embed/Embed.ts index 7c8ff26048e1..896d200b97e7 100644 --- a/packages/builders/src/messages/embed/Embed.ts +++ b/packages/builders/src/messages/embed/Embed.ts @@ -1,4 +1,4 @@ -import type { APIEmbedField } from 'discord-api-types/v9'; +import type { APIEmbedField } from 'discord-api-types/v10'; import { authorNamePredicate, colorPredicate, diff --git a/packages/builders/src/messages/embed/UnsafeEmbed.ts b/packages/builders/src/messages/embed/UnsafeEmbed.ts index 1f9fb4ea1d0b..2e86c340830d 100644 --- a/packages/builders/src/messages/embed/UnsafeEmbed.ts +++ b/packages/builders/src/messages/embed/UnsafeEmbed.ts @@ -1,4 +1,4 @@ -import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v9'; +import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10'; export type RGBTuple = [red: number, green: number, blue: number]; diff --git a/packages/builders/src/util/componentUtil.ts b/packages/builders/src/util/componentUtil.ts index 5d2385a3e89a..06ec6bf8c694 100644 --- a/packages/builders/src/util/componentUtil.ts +++ b/packages/builders/src/util/componentUtil.ts @@ -1,4 +1,4 @@ -import type { APIEmbed } from 'discord-api-types/v9'; +import type { APIEmbed } from 'discord-api-types/v10'; export function embedLength(data: APIEmbed) { return ( diff --git a/packages/discord.js/README.md b/packages/discord.js/README.md index 196c45046b07..379edf1d2f26 100644 --- a/packages/discord.js/README.md +++ b/packages/discord.js/README.md @@ -54,7 +54,7 @@ Register a slash command against the Discord API: ```js const { REST } = require('@discordjs/rest'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const commands = [ { diff --git a/packages/discord.js/package.json b/packages/discord.js/package.json index 25e724b9c9d3..edda72711890 100644 --- a/packages/discord.js/package.json +++ b/packages/discord.js/package.json @@ -52,7 +52,7 @@ "@discordjs/rest": "workspace:^", "@sapphire/snowflake": "^3.1.0", "@types/ws": "^8.2.2", - "discord-api-types": "^0.27.3", + "discord-api-types": "^0.29.0", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "undici": "^4.14.1", diff --git a/packages/discord.js/src/client/Client.js b/packages/discord.js/src/client/Client.js index d9469043c097..ca9a7d375886 100644 --- a/packages/discord.js/src/client/Client.js +++ b/packages/discord.js/src/client/Client.js @@ -2,7 +2,7 @@ const process = require('node:process'); const { Collection } = require('@discordjs/collection'); -const { OAuth2Scopes, Routes } = require('discord-api-types/v9'); +const { OAuth2Scopes, Routes } = require('discord-api-types/v10'); const BaseClient = require('./BaseClient'); const ActionsManager = require('./actions/ActionsManager'); const ClientVoiceManager = require('./voice/ClientVoiceManager'); diff --git a/packages/discord.js/src/client/actions/InteractionCreate.js b/packages/discord.js/src/client/actions/InteractionCreate.js index 1e2a6591f7b1..5ec2b8fb2ccf 100644 --- a/packages/discord.js/src/client/actions/InteractionCreate.js +++ b/packages/discord.js/src/client/actions/InteractionCreate.js @@ -1,6 +1,6 @@ 'use strict'; -const { InteractionType, ComponentType, ApplicationCommandType } = require('discord-api-types/v9'); +const { InteractionType, ComponentType, ApplicationCommandType } = require('discord-api-types/v10'); const Action = require('./Action'); const AutocompleteInteraction = require('../../structures/AutocompleteInteraction'); const ButtonInteraction = require('../../structures/ButtonInteraction'); diff --git a/packages/discord.js/src/client/websocket/WebSocketManager.js b/packages/discord.js/src/client/websocket/WebSocketManager.js index d716197bcc3b..6b205a381d38 100644 --- a/packages/discord.js/src/client/websocket/WebSocketManager.js +++ b/packages/discord.js/src/client/websocket/WebSocketManager.js @@ -4,7 +4,7 @@ const EventEmitter = require('node:events'); const { setImmediate } = require('node:timers'); const { setTimeout: sleep } = require('node:timers/promises'); const { Collection } = require('@discordjs/collection'); -const { GatewayCloseCodes, GatewayDispatchEvents, Routes } = require('discord-api-types/v9'); +const { GatewayCloseCodes, GatewayDispatchEvents, Routes } = require('discord-api-types/v10'); const WebSocketShard = require('./WebSocketShard'); const PacketHandlers = require('./handlers'); const { Error } = require('../../errors'); diff --git a/packages/discord.js/src/client/websocket/WebSocketShard.js b/packages/discord.js/src/client/websocket/WebSocketShard.js index 1098f1703dde..fbdef29312c7 100644 --- a/packages/discord.js/src/client/websocket/WebSocketShard.js +++ b/packages/discord.js/src/client/websocket/WebSocketShard.js @@ -2,7 +2,7 @@ const EventEmitter = require('node:events'); const { setTimeout, setInterval, clearTimeout, clearInterval } = require('node:timers'); -const { GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes } = require('discord-api-types/v9'); +const { GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes } = require('discord-api-types/v10'); const WebSocket = require('../../WebSocket'); const Events = require('../../util/Events'); const IntentsBitField = require('../../util/IntentsBitField'); diff --git a/packages/discord.js/src/index.js b/packages/discord.js/src/index.js index 38649151f839..ec5bbb42d687 100644 --- a/packages/discord.js/src/index.js +++ b/packages/discord.js/src/index.js @@ -169,43 +169,43 @@ exports.WelcomeScreen = require('./structures/WelcomeScreen'); exports.WebSocket = require('./WebSocket'); // External -exports.ActivityType = require('discord-api-types/v9').ActivityType; -exports.ApplicationCommandType = require('discord-api-types/v9').ApplicationCommandType; -exports.ApplicationCommandOptionType = require('discord-api-types/v9').ApplicationCommandOptionType; -exports.ApplicationCommandPermissionType = require('discord-api-types/v9').ApplicationCommandPermissionType; -exports.AuditLogEvent = require('discord-api-types/v9').AuditLogEvent; -exports.ButtonStyle = require('discord-api-types/v9').ButtonStyle; -exports.ChannelType = require('discord-api-types/v9').ChannelType; -exports.ComponentType = require('discord-api-types/v9').ComponentType; -exports.GatewayCloseCodes = require('discord-api-types/v9').GatewayCloseCodes; -exports.GatewayDispatchEvents = require('discord-api-types/v9').GatewayDispatchEvents; -exports.GatewayIntentBits = require('discord-api-types/v9').GatewayIntentBits; -exports.GatewayOpcodes = require('discord-api-types/v9').GatewayOpcodes; -exports.GuildFeature = require('discord-api-types/v9').GuildFeature; -exports.GuildMFALevel = require('discord-api-types/v9').GuildMFALevel; -exports.GuildNSFWLevel = require('discord-api-types/v9').GuildNSFWLevel; -exports.GuildPremiumTier = require('discord-api-types/v9').GuildPremiumTier; -exports.GuildScheduledEventEntityType = require('discord-api-types/v9').GuildScheduledEventEntityType; -exports.GuildScheduledEventPrivacyLevel = require('discord-api-types/v9').GuildScheduledEventPrivacyLevel; -exports.GuildScheduledEventStatus = require('discord-api-types/v9').GuildScheduledEventStatus; -exports.GuildSystemChannelFlags = require('discord-api-types/v9').GuildSystemChannelFlags; -exports.GuildVerificationLevel = require('discord-api-types/v9').GuildVerificationLevel; -exports.InteractionType = require('discord-api-types/v9').InteractionType; -exports.InteractionResponseType = require('discord-api-types/v9').InteractionResponseType; -exports.InviteTargetType = require('discord-api-types/v9').InviteTargetType; -exports.Locale = require('discord-api-types/v9').Locale; -exports.MessageType = require('discord-api-types/v9').MessageType; -exports.MessageFlags = require('discord-api-types/v9').MessageFlags; +exports.ActivityType = require('discord-api-types/v10').ActivityType; +exports.ApplicationCommandType = require('discord-api-types/v10').ApplicationCommandType; +exports.ApplicationCommandOptionType = require('discord-api-types/v10').ApplicationCommandOptionType; +exports.ApplicationCommandPermissionType = require('discord-api-types/v10').ApplicationCommandPermissionType; +exports.AuditLogEvent = require('discord-api-types/v10').AuditLogEvent; +exports.ButtonStyle = require('discord-api-types/v10').ButtonStyle; +exports.ChannelType = require('discord-api-types/v10').ChannelType; +exports.ComponentType = require('discord-api-types/v10').ComponentType; +exports.GatewayCloseCodes = require('discord-api-types/v10').GatewayCloseCodes; +exports.GatewayDispatchEvents = require('discord-api-types/v10').GatewayDispatchEvents; +exports.GatewayIntentBits = require('discord-api-types/v10').GatewayIntentBits; +exports.GatewayOpcodes = require('discord-api-types/v10').GatewayOpcodes; +exports.GuildFeature = require('discord-api-types/v10').GuildFeature; +exports.GuildMFALevel = require('discord-api-types/v10').GuildMFALevel; +exports.GuildNSFWLevel = require('discord-api-types/v10').GuildNSFWLevel; +exports.GuildPremiumTier = require('discord-api-types/v10').GuildPremiumTier; +exports.GuildScheduledEventEntityType = require('discord-api-types/v10').GuildScheduledEventEntityType; +exports.GuildScheduledEventPrivacyLevel = require('discord-api-types/v10').GuildScheduledEventPrivacyLevel; +exports.GuildScheduledEventStatus = require('discord-api-types/v10').GuildScheduledEventStatus; +exports.GuildSystemChannelFlags = require('discord-api-types/v10').GuildSystemChannelFlags; +exports.GuildVerificationLevel = require('discord-api-types/v10').GuildVerificationLevel; +exports.InteractionType = require('discord-api-types/v10').InteractionType; +exports.InteractionResponseType = require('discord-api-types/v10').InteractionResponseType; +exports.InviteTargetType = require('discord-api-types/v10').InviteTargetType; +exports.Locale = require('discord-api-types/v10').Locale; +exports.MessageType = require('discord-api-types/v10').MessageType; +exports.MessageFlags = require('discord-api-types/v10').MessageFlags; exports.ModalBuilder = require('@discordjs/builders').ModalBuilder; -exports.OAuth2Scopes = require('discord-api-types/v9').OAuth2Scopes; -exports.PermissionFlagsBits = require('discord-api-types/v9').PermissionFlagsBits; -exports.RESTJSONErrorCodes = require('discord-api-types/v9').RESTJSONErrorCodes; -exports.StageInstancePrivacyLevel = require('discord-api-types/v9').StageInstancePrivacyLevel; -exports.StickerType = require('discord-api-types/v9').StickerType; -exports.StickerFormatType = require('discord-api-types/v9').StickerFormatType; -exports.TextInputStyle = require('discord-api-types/v9').TextInputStyle; -exports.UserFlags = require('discord-api-types/v9').UserFlags; -exports.WebhookType = require('discord-api-types/v9').WebhookType; +exports.OAuth2Scopes = require('discord-api-types/v10').OAuth2Scopes; +exports.PermissionFlagsBits = require('discord-api-types/v10').PermissionFlagsBits; +exports.RESTJSONErrorCodes = require('discord-api-types/v10').RESTJSONErrorCodes; +exports.StageInstancePrivacyLevel = require('discord-api-types/v10').StageInstancePrivacyLevel; +exports.StickerType = require('discord-api-types/v10').StickerType; +exports.StickerFormatType = require('discord-api-types/v10').StickerFormatType; +exports.TextInputStyle = require('discord-api-types/v10').TextInputStyle; +exports.UserFlags = require('discord-api-types/v10').UserFlags; +exports.WebhookType = require('discord-api-types/v10').WebhookType; exports.UnsafeButtonBuilder = require('@discordjs/builders').UnsafeButtonBuilder; exports.UnsafeSelectMenuBuilder = require('@discordjs/builders').UnsafeSelectMenuBuilder; exports.SelectMenuOptionBuilder = require('@discordjs/builders').SelectMenuOptionBuilder; diff --git a/packages/discord.js/src/managers/ApplicationCommandManager.js b/packages/discord.js/src/managers/ApplicationCommandManager.js index d9fbf5fa229a..b5ed77fa9e58 100644 --- a/packages/discord.js/src/managers/ApplicationCommandManager.js +++ b/packages/discord.js/src/managers/ApplicationCommandManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); diff --git a/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js b/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js index 1ed52173843a..7f6ea833f368 100644 --- a/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js +++ b/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { RESTJSONErrorCodes, Routes } = require('discord-api-types/v9'); +const { RESTJSONErrorCodes, Routes } = require('discord-api-types/v10'); const BaseManager = require('./BaseManager'); const { Error, TypeError } = require('../errors'); diff --git a/packages/discord.js/src/managers/ChannelManager.js b/packages/discord.js/src/managers/ChannelManager.js index b2aff2a2c32d..df099999c974 100644 --- a/packages/discord.js/src/managers/ChannelManager.js +++ b/packages/discord.js/src/managers/ChannelManager.js @@ -1,7 +1,7 @@ 'use strict'; const process = require('node:process'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { Channel } = require('../structures/Channel'); const { ThreadChannelTypes } = require('../util/Constants'); diff --git a/packages/discord.js/src/managers/GuildBanManager.js b/packages/discord.js/src/managers/GuildBanManager.js index d459cfbeebfd..6ad9d2ab5579 100644 --- a/packages/discord.js/src/managers/GuildBanManager.js +++ b/packages/discord.js/src/managers/GuildBanManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError, Error } = require('../errors'); const GuildBan = require('../structures/GuildBan'); diff --git a/packages/discord.js/src/managers/GuildChannelManager.js b/packages/discord.js/src/managers/GuildChannelManager.js index 164698fdf0d8..9a2c24049068 100644 --- a/packages/discord.js/src/managers/GuildChannelManager.js +++ b/packages/discord.js/src/managers/GuildChannelManager.js @@ -2,7 +2,7 @@ const process = require('node:process'); const { Collection } = require('@discordjs/collection'); -const { ChannelType, Routes } = require('discord-api-types/v9'); +const { ChannelType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const ThreadManager = require('./ThreadManager'); const { Error, TypeError } = require('../errors'); diff --git a/packages/discord.js/src/managers/GuildEmojiManager.js b/packages/discord.js/src/managers/GuildEmojiManager.js index 70302f9ace29..772ea08567a1 100644 --- a/packages/discord.js/src/managers/GuildEmojiManager.js +++ b/packages/discord.js/src/managers/GuildEmojiManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes, PermissionFlagsBits } = require('discord-api-types/v9'); +const { Routes, PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildEmojiManager = require('./BaseGuildEmojiManager'); const { Error, TypeError } = require('../errors'); const DataResolver = require('../util/DataResolver'); diff --git a/packages/discord.js/src/managers/GuildInviteManager.js b/packages/discord.js/src/managers/GuildInviteManager.js index 3a4150b18ae9..5b74c4749783 100644 --- a/packages/discord.js/src/managers/GuildInviteManager.js +++ b/packages/discord.js/src/managers/GuildInviteManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { Error } = require('../errors'); const Invite = require('../structures/Invite'); diff --git a/packages/discord.js/src/managers/GuildManager.js b/packages/discord.js/src/managers/GuildManager.js index 5821fe83de02..4b0bca122d57 100644 --- a/packages/discord.js/src/managers/GuildManager.js +++ b/packages/discord.js/src/managers/GuildManager.js @@ -3,7 +3,7 @@ const process = require('node:process'); const { setTimeout, clearTimeout } = require('node:timers'); const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { Guild } = require('../structures/Guild'); const GuildChannel = require('../structures/GuildChannel'); diff --git a/packages/discord.js/src/managers/GuildMemberManager.js b/packages/discord.js/src/managers/GuildMemberManager.js index 086d43c5cde1..84c49cb49638 100644 --- a/packages/discord.js/src/managers/GuildMemberManager.js +++ b/packages/discord.js/src/managers/GuildMemberManager.js @@ -4,7 +4,7 @@ const { Buffer } = require('node:buffer'); const { setTimeout, clearTimeout } = require('node:timers'); const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes, GatewayOpcodes } = require('discord-api-types/v9'); +const { Routes, GatewayOpcodes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { Error, TypeError, RangeError } = require('../errors'); const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel'); diff --git a/packages/discord.js/src/managers/GuildMemberRoleManager.js b/packages/discord.js/src/managers/GuildMemberRoleManager.js index 5e39c2fc24be..20ffe864459b 100644 --- a/packages/discord.js/src/managers/GuildMemberRoleManager.js +++ b/packages/discord.js/src/managers/GuildMemberRoleManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const DataManager = require('./DataManager'); const { TypeError } = require('../errors'); const { Role } = require('../structures/Role'); diff --git a/packages/discord.js/src/managers/GuildScheduledEventManager.js b/packages/discord.js/src/managers/GuildScheduledEventManager.js index 3acdfc8eb5d3..71fe63289f9b 100644 --- a/packages/discord.js/src/managers/GuildScheduledEventManager.js +++ b/packages/discord.js/src/managers/GuildScheduledEventManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { GuildScheduledEventEntityType, Routes } = require('discord-api-types/v9'); +const { GuildScheduledEventEntityType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError, Error } = require('../errors'); const { GuildScheduledEvent } = require('../structures/GuildScheduledEvent'); diff --git a/packages/discord.js/src/managers/GuildStickerManager.js b/packages/discord.js/src/managers/GuildStickerManager.js index 6f600ff966c5..eecbfbb29f2e 100644 --- a/packages/discord.js/src/managers/GuildStickerManager.js +++ b/packages/discord.js/src/managers/GuildStickerManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const MessagePayload = require('../structures/MessagePayload'); diff --git a/packages/discord.js/src/managers/MessageManager.js b/packages/discord.js/src/managers/MessageManager.js index 684453f3798d..8e255427c7f1 100644 --- a/packages/discord.js/src/managers/MessageManager.js +++ b/packages/discord.js/src/managers/MessageManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const { Message } = require('../structures/Message'); diff --git a/packages/discord.js/src/managers/PermissionOverwriteManager.js b/packages/discord.js/src/managers/PermissionOverwriteManager.js index b3093ce92d3e..efbaa0779771 100644 --- a/packages/discord.js/src/managers/PermissionOverwriteManager.js +++ b/packages/discord.js/src/managers/PermissionOverwriteManager.js @@ -2,7 +2,7 @@ const process = require('node:process'); const { Collection } = require('@discordjs/collection'); -const { OverwriteType, Routes } = require('discord-api-types/v9'); +const { OverwriteType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const PermissionOverwrites = require('../structures/PermissionOverwrites'); diff --git a/packages/discord.js/src/managers/ReactionManager.js b/packages/discord.js/src/managers/ReactionManager.js index cd104f6502b6..c92999c17710 100644 --- a/packages/discord.js/src/managers/ReactionManager.js +++ b/packages/discord.js/src/managers/ReactionManager.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const MessageReaction = require('../structures/MessageReaction'); diff --git a/packages/discord.js/src/managers/ReactionUserManager.js b/packages/discord.js/src/managers/ReactionUserManager.js index d8ac3c566ad9..f99d3ca3a259 100644 --- a/packages/discord.js/src/managers/ReactionUserManager.js +++ b/packages/discord.js/src/managers/ReactionUserManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { Error } = require('../errors'); const User = require('../structures/User'); diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index 2e8452bef5e0..8f9eb2fc5772 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -2,7 +2,7 @@ const process = require('node:process'); const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const { Role } = require('../structures/Role'); diff --git a/packages/discord.js/src/managers/StageInstanceManager.js b/packages/discord.js/src/managers/StageInstanceManager.js index f2df1f69d4bf..cde863e40bd0 100644 --- a/packages/discord.js/src/managers/StageInstanceManager.js +++ b/packages/discord.js/src/managers/StageInstanceManager.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError, Error } = require('../errors'); const { StageInstance } = require('../structures/StageInstance'); diff --git a/packages/discord.js/src/managers/ThreadManager.js b/packages/discord.js/src/managers/ThreadManager.js index 4aade1c8e2c7..470716345276 100644 --- a/packages/discord.js/src/managers/ThreadManager.js +++ b/packages/discord.js/src/managers/ThreadManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { ChannelType, Routes } = require('discord-api-types/v9'); +const { ChannelType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const ThreadChannel = require('../structures/ThreadChannel'); diff --git a/packages/discord.js/src/managers/ThreadMemberManager.js b/packages/discord.js/src/managers/ThreadMemberManager.js index 1521f9252392..dced655b4160 100644 --- a/packages/discord.js/src/managers/ThreadMemberManager.js +++ b/packages/discord.js/src/managers/ThreadMemberManager.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { TypeError } = require('../errors'); const ThreadMember = require('../structures/ThreadMember'); diff --git a/packages/discord.js/src/managers/UserManager.js b/packages/discord.js/src/managers/UserManager.js index ff865ba37110..15021f1f1bb3 100644 --- a/packages/discord.js/src/managers/UserManager.js +++ b/packages/discord.js/src/managers/UserManager.js @@ -1,6 +1,6 @@ 'use strict'; -const { ChannelType, Routes } = require('discord-api-types/v9'); +const { ChannelType, Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { GuildMember } = require('../structures/GuildMember'); const { Message } = require('../structures/Message'); diff --git a/packages/discord.js/src/structures/ApplicationCommand.js b/packages/discord.js/src/structures/ApplicationCommand.js index f43304d92272..069aaa6f8cd4 100644 --- a/packages/discord.js/src/structures/ApplicationCommand.js +++ b/packages/discord.js/src/structures/ApplicationCommand.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { ApplicationCommandOptionType } = require('discord-api-types/v9'); +const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const Base = require('./Base'); const ApplicationCommandPermissionsManager = require('../managers/ApplicationCommandPermissionsManager'); diff --git a/packages/discord.js/src/structures/AutocompleteInteraction.js b/packages/discord.js/src/structures/AutocompleteInteraction.js index 161bbe8580fd..6d1969ed3f33 100644 --- a/packages/discord.js/src/structures/AutocompleteInteraction.js +++ b/packages/discord.js/src/structures/AutocompleteInteraction.js @@ -1,6 +1,6 @@ 'use strict'; -const { InteractionResponseType, Routes } = require('discord-api-types/v9'); +const { InteractionResponseType, Routes } = require('discord-api-types/v10'); const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver'); const Interaction = require('./Interaction'); diff --git a/packages/discord.js/src/structures/BaseGuild.js b/packages/discord.js/src/structures/BaseGuild.js index fd99b9539d2d..8adf72ec5ecd 100644 --- a/packages/discord.js/src/structures/BaseGuild.js +++ b/packages/discord.js/src/structures/BaseGuild.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); /** diff --git a/packages/discord.js/src/structures/BaseGuildVoiceChannel.js b/packages/discord.js/src/structures/BaseGuildVoiceChannel.js index ad905cdb159e..fefc3b3e2ae8 100644 --- a/packages/discord.js/src/structures/BaseGuildVoiceChannel.js +++ b/packages/discord.js/src/structures/BaseGuildVoiceChannel.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const GuildChannel = require('./GuildChannel'); /** diff --git a/packages/discord.js/src/structures/Channel.js b/packages/discord.js/src/structures/Channel.js index b5d85be8a396..d5fa0601b1a3 100644 --- a/packages/discord.js/src/structures/Channel.js +++ b/packages/discord.js/src/structures/Channel.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { ChannelType, Routes } = require('discord-api-types/v9'); +const { ChannelType, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { ThreadChannelTypes } = require('../util/Constants'); let CategoryChannel; diff --git a/packages/discord.js/src/structures/ClientApplication.js b/packages/discord.js/src/structures/ClientApplication.js index 505ae26eef1b..f77cf0402954 100644 --- a/packages/discord.js/src/structures/ClientApplication.js +++ b/packages/discord.js/src/structures/ClientApplication.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const Team = require('./Team'); const Application = require('./interfaces/Application'); const ApplicationCommandManager = require('../managers/ApplicationCommandManager'); diff --git a/packages/discord.js/src/structures/ClientPresence.js b/packages/discord.js/src/structures/ClientPresence.js index c9e67db6428f..0661ee1861aa 100644 --- a/packages/discord.js/src/structures/ClientPresence.js +++ b/packages/discord.js/src/structures/ClientPresence.js @@ -1,6 +1,6 @@ 'use strict'; -const { GatewayOpcodes } = require('discord-api-types/v9'); +const { GatewayOpcodes } = require('discord-api-types/v10'); const { Presence } = require('./Presence'); const { TypeError } = require('../errors'); diff --git a/packages/discord.js/src/structures/ClientUser.js b/packages/discord.js/src/structures/ClientUser.js index a3090bd51924..9fc2b2cfa706 100644 --- a/packages/discord.js/src/structures/ClientUser.js +++ b/packages/discord.js/src/structures/ClientUser.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const User = require('./User'); const DataResolver = require('../util/DataResolver'); diff --git a/packages/discord.js/src/structures/CommandInteractionOptionResolver.js b/packages/discord.js/src/structures/CommandInteractionOptionResolver.js index 2aa693829068..6f01cf61cdf4 100644 --- a/packages/discord.js/src/structures/CommandInteractionOptionResolver.js +++ b/packages/discord.js/src/structures/CommandInteractionOptionResolver.js @@ -1,6 +1,6 @@ 'use strict'; -const { ApplicationCommandOptionType } = require('discord-api-types/v9'); +const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const { TypeError } = require('../errors'); /** diff --git a/packages/discord.js/src/structures/ContextMenuCommandInteraction.js b/packages/discord.js/src/structures/ContextMenuCommandInteraction.js index 360f97e322e0..1db4a7ddb1eb 100644 --- a/packages/discord.js/src/structures/ContextMenuCommandInteraction.js +++ b/packages/discord.js/src/structures/ContextMenuCommandInteraction.js @@ -1,6 +1,6 @@ 'use strict'; -const { ApplicationCommandOptionType } = require('discord-api-types/v9'); +const { ApplicationCommandOptionType } = require('discord-api-types/v10'); const CommandInteraction = require('./CommandInteraction'); const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver'); diff --git a/packages/discord.js/src/structures/DMChannel.js b/packages/discord.js/src/structures/DMChannel.js index f78f04cd1741..07add0309ebf 100644 --- a/packages/discord.js/src/structures/DMChannel.js +++ b/packages/discord.js/src/structures/DMChannel.js @@ -1,7 +1,7 @@ 'use strict'; const { userMention } = require('@discordjs/builders'); -const { ChannelType } = require('discord-api-types/v9'); +const { ChannelType } = require('discord-api-types/v10'); const { Channel } = require('./Channel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const MessageManager = require('../managers/MessageManager'); diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js index c1afc973a0d2..4474d4d71bb8 100644 --- a/packages/discord.js/src/structures/Guild.js +++ b/packages/discord.js/src/structures/Guild.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { ChannelType, GuildPremiumTier, Routes } = require('discord-api-types/v9'); +const { ChannelType, GuildPremiumTier, Routes } = require('discord-api-types/v10'); const AnonymousGuild = require('./AnonymousGuild'); const GuildAuditLogs = require('./GuildAuditLogs'); const GuildPreview = require('./GuildPreview'); diff --git a/packages/discord.js/src/structures/GuildAuditLogs.js b/packages/discord.js/src/structures/GuildAuditLogs.js index 199e9d1baaf3..37fb89cc3a17 100644 --- a/packages/discord.js/src/structures/GuildAuditLogs.js +++ b/packages/discord.js/src/structures/GuildAuditLogs.js @@ -2,7 +2,7 @@ const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { OverwriteType, AuditLogEvent } = require('discord-api-types/v9'); +const { OverwriteType, AuditLogEvent } = require('discord-api-types/v10'); const { GuildScheduledEvent } = require('./GuildScheduledEvent'); const Integration = require('./Integration'); const Invite = require('./Invite'); diff --git a/packages/discord.js/src/structures/GuildChannel.js b/packages/discord.js/src/structures/GuildChannel.js index 67c2f9eeea32..a68cc86fe1f5 100644 --- a/packages/discord.js/src/structures/GuildChannel.js +++ b/packages/discord.js/src/structures/GuildChannel.js @@ -1,6 +1,6 @@ 'use strict'; -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const { Channel } = require('./Channel'); const { Error } = require('../errors'); const PermissionOverwriteManager = require('../managers/PermissionOverwriteManager'); diff --git a/packages/discord.js/src/structures/GuildEmoji.js b/packages/discord.js/src/structures/GuildEmoji.js index 609083bd7f91..79ab303c570f 100644 --- a/packages/discord.js/src/structures/GuildEmoji.js +++ b/packages/discord.js/src/structures/GuildEmoji.js @@ -1,6 +1,6 @@ 'use strict'; -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildEmoji = require('./BaseGuildEmoji'); const { Error } = require('../errors'); const GuildEmojiRoleManager = require('../managers/GuildEmojiRoleManager'); diff --git a/packages/discord.js/src/structures/GuildMember.js b/packages/discord.js/src/structures/GuildMember.js index a02fd7acf01f..3d4f6d280e5f 100644 --- a/packages/discord.js/src/structures/GuildMember.js +++ b/packages/discord.js/src/structures/GuildMember.js @@ -1,6 +1,6 @@ 'use strict'; -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const VoiceState = require('./VoiceState'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); diff --git a/packages/discord.js/src/structures/GuildPreview.js b/packages/discord.js/src/structures/GuildPreview.js index f4fc4ed65065..6ff20265b3e1 100644 --- a/packages/discord.js/src/structures/GuildPreview.js +++ b/packages/discord.js/src/structures/GuildPreview.js @@ -2,7 +2,7 @@ const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const GuildPreviewEmoji = require('./GuildPreviewEmoji'); const { Sticker } = require('./Sticker'); diff --git a/packages/discord.js/src/structures/GuildScheduledEvent.js b/packages/discord.js/src/structures/GuildScheduledEvent.js index b082ed3ed9ba..d6ee734af8b5 100644 --- a/packages/discord.js/src/structures/GuildScheduledEvent.js +++ b/packages/discord.js/src/structures/GuildScheduledEvent.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { GuildScheduledEventStatus, GuildScheduledEventEntityType, RouteBases } = require('discord-api-types/v9'); +const { GuildScheduledEventStatus, GuildScheduledEventEntityType, RouteBases } = require('discord-api-types/v10'); const Base = require('./Base'); const { Error } = require('../errors'); diff --git a/packages/discord.js/src/structures/GuildTemplate.js b/packages/discord.js/src/structures/GuildTemplate.js index 02e18bb4c67a..9c447f1279a7 100644 --- a/packages/discord.js/src/structures/GuildTemplate.js +++ b/packages/discord.js/src/structures/GuildTemplate.js @@ -1,7 +1,7 @@ 'use strict'; const { setTimeout, clearTimeout } = require('node:timers'); -const { RouteBases, Routes } = require('discord-api-types/v9'); +const { RouteBases, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const DataResolver = require('../util/DataResolver'); const Events = require('../util/Events'); diff --git a/packages/discord.js/src/structures/Integration.js b/packages/discord.js/src/structures/Integration.js index d08effdd2680..85463845f1c7 100644 --- a/packages/discord.js/src/structures/Integration.js +++ b/packages/discord.js/src/structures/Integration.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const IntegrationApplication = require('./IntegrationApplication'); diff --git a/packages/discord.js/src/structures/Interaction.js b/packages/discord.js/src/structures/Interaction.js index 1467679de57b..d4640a194312 100644 --- a/packages/discord.js/src/structures/Interaction.js +++ b/packages/discord.js/src/structures/Interaction.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { InteractionType, ApplicationCommandType, ComponentType } = require('discord-api-types/v9'); +const { InteractionType, ApplicationCommandType, ComponentType } = require('discord-api-types/v10'); const Base = require('./Base'); const PermissionsBitField = require('../util/PermissionsBitField'); diff --git a/packages/discord.js/src/structures/Invite.js b/packages/discord.js/src/structures/Invite.js index 5252dd7cf3c8..43bc677fab2f 100644 --- a/packages/discord.js/src/structures/Invite.js +++ b/packages/discord.js/src/structures/Invite.js @@ -1,6 +1,6 @@ 'use strict'; -const { RouteBases, Routes, PermissionFlagsBits } = require('discord-api-types/v9'); +const { RouteBases, Routes, PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const { GuildScheduledEvent } = require('./GuildScheduledEvent'); const IntegrationApplication = require('./IntegrationApplication'); diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js index b4602fc45a42..91949f0e0014 100644 --- a/packages/discord.js/src/structures/Message.js +++ b/packages/discord.js/src/structures/Message.js @@ -8,7 +8,7 @@ const { MessageType, MessageFlags, PermissionFlagsBits, -} = require('discord-api-types/v9'); +} = require('discord-api-types/v10'); const Base = require('./Base'); const ClientApplication = require('./ClientApplication'); const Embed = require('./Embed'); diff --git a/packages/discord.js/src/structures/MessagePayload.js b/packages/discord.js/src/structures/MessagePayload.js index b79feb611823..1fe65bbf7ddd 100644 --- a/packages/discord.js/src/structures/MessagePayload.js +++ b/packages/discord.js/src/structures/MessagePayload.js @@ -2,7 +2,7 @@ const { Buffer } = require('node:buffer'); const { isJSONEncodable } = require('@discordjs/builders'); -const { MessageFlags } = require('discord-api-types/v9'); +const { MessageFlags } = require('discord-api-types/v10'); const { RangeError } = require('../errors'); const DataResolver = require('../util/DataResolver'); const MessageFlagsBitField = require('../util/MessageFlagsBitField'); diff --git a/packages/discord.js/src/structures/MessageReaction.js b/packages/discord.js/src/structures/MessageReaction.js index 74a79e646e31..857e719b8db3 100644 --- a/packages/discord.js/src/structures/MessageReaction.js +++ b/packages/discord.js/src/structures/MessageReaction.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const GuildEmoji = require('./GuildEmoji'); const ReactionEmoji = require('./ReactionEmoji'); const ReactionUserManager = require('../managers/ReactionUserManager'); diff --git a/packages/discord.js/src/structures/ModalSubmitFieldsResolver.js b/packages/discord.js/src/structures/ModalSubmitFieldsResolver.js index 8db89acd8bf8..6aa9529aa012 100644 --- a/packages/discord.js/src/structures/ModalSubmitFieldsResolver.js +++ b/packages/discord.js/src/structures/ModalSubmitFieldsResolver.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { ComponentType } = require('discord-api-types/v9'); +const { ComponentType } = require('discord-api-types/v10'); const { TypeError } = require('../errors'); /** diff --git a/packages/discord.js/src/structures/NewsChannel.js b/packages/discord.js/src/structures/NewsChannel.js index bc8cd6f0b9fb..a0cf632c7b6d 100644 --- a/packages/discord.js/src/structures/NewsChannel.js +++ b/packages/discord.js/src/structures/NewsChannel.js @@ -1,6 +1,6 @@ 'use strict'; -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const BaseGuildTextChannel = require('./BaseGuildTextChannel'); const { Error } = require('../errors'); diff --git a/packages/discord.js/src/structures/PermissionOverwrites.js b/packages/discord.js/src/structures/PermissionOverwrites.js index 01d141e78de1..31a5be783f7d 100644 --- a/packages/discord.js/src/structures/PermissionOverwrites.js +++ b/packages/discord.js/src/structures/PermissionOverwrites.js @@ -1,6 +1,6 @@ 'use strict'; -const { OverwriteType } = require('discord-api-types/v9'); +const { OverwriteType } = require('discord-api-types/v10'); const Base = require('./Base'); const { Role } = require('./Role'); const { TypeError } = require('../errors'); diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index 53259738c7f1..a6260c7cd6ef 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const Base = require('./Base'); const { Error } = require('../errors'); const PermissionsBitField = require('../util/PermissionsBitField'); diff --git a/packages/discord.js/src/structures/Sticker.js b/packages/discord.js/src/structures/Sticker.js index 95222940ab12..132064a272c0 100644 --- a/packages/discord.js/src/structures/Sticker.js +++ b/packages/discord.js/src/structures/Sticker.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes, StickerFormatType } = require('discord-api-types/v9'); +const { Routes, StickerFormatType } = require('discord-api-types/v10'); const Base = require('./Base'); /** diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 6cd28c4ff4a0..7865b01f9000 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -1,6 +1,6 @@ 'use strict'; -const { ChannelType, PermissionFlagsBits, Routes } = require('discord-api-types/v9'); +const { ChannelType, PermissionFlagsBits, Routes } = require('discord-api-types/v10'); const { Channel } = require('./Channel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { RangeError } = require('../errors'); diff --git a/packages/discord.js/src/structures/VoiceChannel.js b/packages/discord.js/src/structures/VoiceChannel.js index 1b5bc202eb56..412804b113e5 100644 --- a/packages/discord.js/src/structures/VoiceChannel.js +++ b/packages/discord.js/src/structures/VoiceChannel.js @@ -1,6 +1,6 @@ 'use strict'; -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel'); /** diff --git a/packages/discord.js/src/structures/VoiceState.js b/packages/discord.js/src/structures/VoiceState.js index af0d1d723b8f..75411fdaa2d2 100644 --- a/packages/discord.js/src/structures/VoiceState.js +++ b/packages/discord.js/src/structures/VoiceState.js @@ -1,6 +1,6 @@ 'use strict'; -const { ChannelType, Routes } = require('discord-api-types/v9'); +const { ChannelType, Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { Error, TypeError } = require('../errors'); diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index 27c870c20e06..d53909c54669 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -1,7 +1,7 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes, WebhookType } = require('discord-api-types/v9'); +const { Routes, WebhookType } = require('discord-api-types/v10'); const MessagePayload = require('./MessagePayload'); const { Error } = require('../errors'); const DataResolver = require('../util/DataResolver'); diff --git a/packages/discord.js/src/structures/Widget.js b/packages/discord.js/src/structures/Widget.js index 43c7c84f54fa..146ec7eacfd5 100644 --- a/packages/discord.js/src/structures/Widget.js +++ b/packages/discord.js/src/structures/Widget.js @@ -1,7 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); -const { Routes } = require('discord-api-types/v9'); +const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const WidgetMember = require('./WidgetMember'); diff --git a/packages/discord.js/src/structures/interfaces/InteractionResponses.js b/packages/discord.js/src/structures/interfaces/InteractionResponses.js index 0679e50be5d9..2a126e90bfe2 100644 --- a/packages/discord.js/src/structures/interfaces/InteractionResponses.js +++ b/packages/discord.js/src/structures/interfaces/InteractionResponses.js @@ -1,7 +1,7 @@ 'use strict'; const { isJSONEncodable } = require('@discordjs/builders'); -const { InteractionResponseType, MessageFlags, Routes } = require('discord-api-types/v9'); +const { InteractionResponseType, MessageFlags, Routes } = require('discord-api-types/v10'); const { Error } = require('../../errors'); const MessagePayload = require('../MessagePayload'); diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index a4f361147bc0..0aa6d2e413b8 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -2,7 +2,7 @@ const { Collection } = require('@discordjs/collection'); const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { InteractionType, Routes } = require('discord-api-types/v9'); +const { InteractionType, Routes } = require('discord-api-types/v10'); const { TypeError, Error } = require('../../errors'); const InteractionCollector = require('../InteractionCollector'); const MessageCollector = require('../MessageCollector'); diff --git a/packages/discord.js/src/util/ActivityFlagsBitField.js b/packages/discord.js/src/util/ActivityFlagsBitField.js index 2de552fefd47..fcfb344294d9 100644 --- a/packages/discord.js/src/util/ActivityFlagsBitField.js +++ b/packages/discord.js/src/util/ActivityFlagsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { ActivityFlags } = require('discord-api-types/v9'); +const { ActivityFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/ApplicationFlagsBitField.js b/packages/discord.js/src/util/ApplicationFlagsBitField.js index 885260e8c494..5404c015507f 100644 --- a/packages/discord.js/src/util/ApplicationFlagsBitField.js +++ b/packages/discord.js/src/util/ApplicationFlagsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { ApplicationFlags } = require('discord-api-types/v9'); +const { ApplicationFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/Components.js b/packages/discord.js/src/util/Components.js index 95c00440e836..2f7eae695d55 100644 --- a/packages/discord.js/src/util/Components.js +++ b/packages/discord.js/src/util/Components.js @@ -1,7 +1,7 @@ 'use strict'; // This file contains the typedefs for camel-cased json data -const { ComponentType } = require('discord-api-types/v9'); +const { ComponentType } = require('discord-api-types/v10'); /** * @typedef {Object} BaseComponentData * @property {ComponentType} type The type of component diff --git a/packages/discord.js/src/util/Constants.js b/packages/discord.js/src/util/Constants.js index ce72d69de38b..99abc72b3bf6 100644 --- a/packages/discord.js/src/util/Constants.js +++ b/packages/discord.js/src/util/Constants.js @@ -1,7 +1,7 @@ 'use strict'; const process = require('node:process'); -const { ChannelType, MessageType } = require('discord-api-types/v9'); +const { ChannelType, MessageType } = require('discord-api-types/v10'); const Package = (exports.Package = require('../../package.json')); exports.UserAgent = `DiscordBot (${Package.homepage}, ${Package.version}) Node.js/${process.version}`; diff --git a/packages/discord.js/src/util/EnumResolvers.js b/packages/discord.js/src/util/EnumResolvers.js index 92684afb4a68..5f036e2a29ad 100644 --- a/packages/discord.js/src/util/EnumResolvers.js +++ b/packages/discord.js/src/util/EnumResolvers.js @@ -21,7 +21,7 @@ const { GuildScheduledEventEntityType, IntegrationExpireBehavior, AuditLogEvent, -} = require('discord-api-types/v9'); +} = require('discord-api-types/v10'); function unknownKeyStrategy(val) { throw new Error(`Could not resolve enum value for ${val}`); diff --git a/packages/discord.js/src/util/IntentsBitField.js b/packages/discord.js/src/util/IntentsBitField.js index a1731761dbad..cc403838835b 100644 --- a/packages/discord.js/src/util/IntentsBitField.js +++ b/packages/discord.js/src/util/IntentsBitField.js @@ -1,5 +1,5 @@ 'use strict'; -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/MessageFlagsBitField.js b/packages/discord.js/src/util/MessageFlagsBitField.js index a9f1e7f579b8..57cd83b2cd04 100644 --- a/packages/discord.js/src/util/MessageFlagsBitField.js +++ b/packages/discord.js/src/util/MessageFlagsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { MessageFlags } = require('discord-api-types/v9'); +const { MessageFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/PermissionsBitField.js b/packages/discord.js/src/util/PermissionsBitField.js index ff101c3119b6..7eb72b7877f8 100644 --- a/packages/discord.js/src/util/PermissionsBitField.js +++ b/packages/discord.js/src/util/PermissionsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { PermissionFlagsBits } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/SystemChannelFlagsBitField.js b/packages/discord.js/src/util/SystemChannelFlagsBitField.js index 90f2cca01c1b..e7c28ea66c57 100644 --- a/packages/discord.js/src/util/SystemChannelFlagsBitField.js +++ b/packages/discord.js/src/util/SystemChannelFlagsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { GuildSystemChannelFlags } = require('discord-api-types/v9'); +const { GuildSystemChannelFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/UserFlagsBitField.js b/packages/discord.js/src/util/UserFlagsBitField.js index dc2a94375764..91bce5098ffe 100644 --- a/packages/discord.js/src/util/UserFlagsBitField.js +++ b/packages/discord.js/src/util/UserFlagsBitField.js @@ -1,6 +1,6 @@ 'use strict'; -const { UserFlags } = require('discord-api-types/v9'); +const { UserFlags } = require('discord-api-types/v10'); const BitField = require('./BitField'); /** diff --git a/packages/discord.js/src/util/Util.js b/packages/discord.js/src/util/Util.js index 74493405243e..eb052d059021 100644 --- a/packages/discord.js/src/util/Util.js +++ b/packages/discord.js/src/util/Util.js @@ -2,7 +2,7 @@ const { parse } = require('node:path'); const { Collection } = require('@discordjs/collection'); -const { ChannelType, RouteBases, Routes } = require('discord-api-types/v9'); +const { ChannelType, RouteBases, Routes } = require('discord-api-types/v10'); const { fetch } = require('undici'); const Colors = require('./Colors'); const { Error: DiscordError, RangeError, TypeError } = require('../errors'); diff --git a/packages/discord.js/test/createGuild.js b/packages/discord.js/test/createGuild.js index 9f2f14a33bcd..90e529a43182 100644 --- a/packages/discord.js/test/createGuild.js +++ b/packages/discord.js/test/createGuild.js @@ -1,7 +1,7 @@ 'use strict'; const assert = require('node:assert'); -const { ChannelType, GatewayIntentBits } = require('discord-api-types/v9'); +const { ChannelType, GatewayIntentBits } = require('discord-api-types/v10'); const { token } = require('./auth'); const { Client } = require('../src'); diff --git a/packages/discord.js/test/random.js b/packages/discord.js/test/random.js index a70ebf1af9ed..99ec1f69aaa8 100644 --- a/packages/discord.js/test/random.js +++ b/packages/discord.js/test/random.js @@ -6,7 +6,7 @@ const request = require('superagent'); const ytdl = require('ytdl-core'); const { token, song } = require('./auth.js'); const { Client } = require('../src'); -const { ChannelType, GatewayIntentBits } = require('discord-api-types/v9'); +const { ChannelType, GatewayIntentBits } = require('discord-api-types/v10'); console.time('magic'); diff --git a/packages/discord.js/test/reactionCollectorCreated.test.js b/packages/discord.js/test/reactionCollectorCreated.test.js index 3c8268f113ab..da140b742e4c 100644 --- a/packages/discord.js/test/reactionCollectorCreated.test.js +++ b/packages/discord.js/test/reactionCollectorCreated.test.js @@ -1,6 +1,6 @@ 'use strict'; -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { token, guildId, channelId, messageId } = require('./auth.js'); const { Client, ReactionCollector } = require('../src'); diff --git a/packages/discord.js/test/sendtest.js b/packages/discord.js/test/sendtest.js index caf8ca4128e3..292c5352708f 100644 --- a/packages/discord.js/test/sendtest.js +++ b/packages/discord.js/test/sendtest.js @@ -5,7 +5,7 @@ const path = require('node:path'); const process = require('node:process'); const { setTimeout: sleep } = require('node:timers/promises'); const util = require('node:util'); -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { fetch } = require('undici'); const { owner, token } = require('./auth.js'); const { Client, MessageAttachment, Embed } = require('../src'); diff --git a/packages/discord.js/test/shard.js b/packages/discord.js/test/shard.js index f3eed127171a..a5dfbe8e1a28 100644 --- a/packages/discord.js/test/shard.js +++ b/packages/discord.js/test/shard.js @@ -2,7 +2,7 @@ const process = require('node:process'); const { setTimeout } = require('node:timers'); -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { token } = require('./auth.json'); const { Client } = require('../src'); diff --git a/packages/discord.js/test/tester1000.js b/packages/discord.js/test/tester1000.js index 3f5402bce5b1..d3b2e1af54f9 100644 --- a/packages/discord.js/test/tester1000.js +++ b/packages/discord.js/test/tester1000.js @@ -1,7 +1,7 @@ 'use strict'; const process = require('node:process'); -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { token, prefix, owner } = require('./auth.js'); const { Client } = require('../src'); diff --git a/packages/discord.js/test/tester2000.js b/packages/discord.js/test/tester2000.js index c7b82a0af1bd..548299802be1 100644 --- a/packages/discord.js/test/tester2000.js +++ b/packages/discord.js/test/tester2000.js @@ -1,7 +1,7 @@ 'use strict'; const process = require('node:process'); -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { token, prefix, owner } = require('./auth.js'); const { Client, Options, Formatters } = require('../src'); diff --git a/packages/discord.js/test/webhooktest.js b/packages/discord.js/test/webhooktest.js index a640ea1d67c9..57db3abf3684 100644 --- a/packages/discord.js/test/webhooktest.js +++ b/packages/discord.js/test/webhooktest.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const path = require('node:path'); const { setTimeout: sleep } = require('node:timers/promises'); const util = require('node:util'); -const { GatewayIntentBits } = require('discord-api-types/v9'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const { fetch } = require('undici'); const { owner, token, webhookChannel, webhookToken } = require('./auth.js'); const { Client, MessageAttachment, Embed, WebhookClient } = require('../src'); diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index a3e0b20b5120..4967e9932db6 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -110,7 +110,7 @@ import { APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; import { Stream } from 'node:stream'; @@ -5336,7 +5336,7 @@ export { ThreadMemberFlags, UserFlags, WebhookType, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; export { UnsafeButtonBuilder, UnsafeSelectMenuBuilder, diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 5c289728efe9..1d094ea03389 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -22,7 +22,7 @@ import { TextInputStyle, APITextInputComponent, APIEmbed, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { ApplicationCommand, ApplicationCommandData, diff --git a/packages/discord.js/typings/rawDataTypes.d.ts b/packages/discord.js/typings/rawDataTypes.d.ts index 885566d40d0c..28b2709aac64 100644 --- a/packages/discord.js/typings/rawDataTypes.d.ts +++ b/packages/discord.js/typings/rawDataTypes.d.ts @@ -76,7 +76,7 @@ import { RESTPostAPIWebhookWithTokenJSONBody, Snowflake, APIGuildScheduledEvent, -} from 'discord-api-types/v9'; +} from 'discord-api-types/v10'; import { GuildChannel, Guild, PermissionOverwrites } from '.'; export type RawActivityData = GatewayActivity; diff --git a/packages/rest/__tests__/DiscordAPIError.test.ts b/packages/rest/__tests__/DiscordAPIError.test.ts index 2e5ef5c3dbaa..dcf8e4ca228f 100644 --- a/packages/rest/__tests__/DiscordAPIError.test.ts +++ b/packages/rest/__tests__/DiscordAPIError.test.ts @@ -6,7 +6,7 @@ test('Unauthorized', () => { 0, 401, 'PATCH', - 'https://discord.com/api/v9/guilds/:id', + 'https://discord.com/api/v10/guilds/:id', { files: undefined, body: undefined, @@ -18,7 +18,7 @@ test('Unauthorized', () => { expect(error.method).toBe('PATCH'); expect(error.name).toBe('DiscordAPIError[0]'); expect(error.status).toBe(401); - expect(error.url).toBe('https://discord.com/api/v9/guilds/:id'); + expect(error.url).toBe('https://discord.com/api/v10/guilds/:id'); expect(error.requestBody.files).toBe(undefined); expect(error.requestBody.json).toBe(undefined); }); @@ -35,7 +35,7 @@ test('Invalid Form Body Error (error.{property}._errors.{index})', () => { 50035, 400, 'PATCH', - 'https://discord.com/api/v9/users/@me', + 'https://discord.com/api/v10/users/@me', { files: undefined, body: { @@ -51,7 +51,7 @@ test('Invalid Form Body Error (error.{property}._errors.{index})', () => { expect(error.method).toBe('PATCH'); expect(error.name).toBe('DiscordAPIError[50035]'); expect(error.status).toBe(400); - expect(error.url).toBe('https://discord.com/api/v9/users/@me'); + expect(error.url).toBe('https://discord.com/api/v10/users/@me'); expect(error.requestBody.files).toBe(undefined); expect(error.requestBody.json).toStrictEqual({ username: 'a' }); }); @@ -70,7 +70,7 @@ test('Invalid FormFields Error (error.errors.{property}.{property}.{index}.{prop 50035, 400, 'POST', - 'https://discord.com/api/v9/channels/:id', + 'https://discord.com/api/v10/channels/:id', {}, ); @@ -81,7 +81,7 @@ test('Invalid FormFields Error (error.errors.{property}.{property}.{index}.{prop expect(error.method).toBe('POST'); expect(error.name).toBe('DiscordAPIError[50035]'); expect(error.status).toBe(400); - expect(error.url).toBe('https://discord.com/api/v9/channels/:id'); + expect(error.url).toBe('https://discord.com/api/v10/channels/:id'); }); test('Invalid FormFields Error (error.errors.{property}.{property}._errors.{index}._errors)', () => { @@ -98,7 +98,7 @@ test('Invalid FormFields Error (error.errors.{property}.{property}._errors.{inde 50035, 400, 'PATCH', - 'https://discord.com/api/v9/guilds/:id', + 'https://discord.com/api/v10/guilds/:id', {}, ); @@ -109,7 +109,7 @@ test('Invalid FormFields Error (error.errors.{property}.{property}._errors.{inde expect(error.method).toBe('PATCH'); expect(error.name).toBe('DiscordAPIError[50035]'); expect(error.status).toBe(400); - expect(error.url).toBe('https://discord.com/api/v9/guilds/:id'); + expect(error.url).toBe('https://discord.com/api/v10/guilds/:id'); }); test('Invalid Oauth Code Error (error.error)', () => { @@ -121,7 +121,7 @@ test('Invalid Oauth Code Error (error.error)', () => { 'invalid_request', 400, 'POST', - 'https://discord.com/api/v9/oauth2/token', + 'https://discord.com/api/v10/oauth2/token', { body: new URLSearchParams([ ['client_id', '1234567890123545678'], @@ -138,5 +138,5 @@ test('Invalid Oauth Code Error (error.error)', () => { expect(error.method).toBe('POST'); expect(error.name).toBe('DiscordAPIError[invalid_request]'); expect(error.status).toBe(400); - expect(error.url).toBe('https://discord.com/api/v9/oauth2/token'); + expect(error.url).toBe('https://discord.com/api/v10/oauth2/token'); }); diff --git a/packages/rest/__tests__/REST.test.ts b/packages/rest/__tests__/REST.test.ts index d379ec79333b..bf6d551d0d9e 100644 --- a/packages/rest/__tests__/REST.test.ts +++ b/packages/rest/__tests__/REST.test.ts @@ -1,7 +1,7 @@ import nock from 'nock'; import { DiscordSnowflake } from '@sapphire/snowflake'; import { REST, DefaultRestOptions, APIRequest } from '../src'; -import { Routes, Snowflake } from 'discord-api-types/v9'; +import { Routes, Snowflake } from 'discord-api-types/v10'; import { Response } from 'node-fetch'; const newSnowflake: Snowflake = DiscordSnowflake.generate().toString(); diff --git a/packages/rest/package.json b/packages/rest/package.json index 017637a715a6..ab5958012288 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -54,7 +54,7 @@ "@sapphire/async-queue": "^1.2.0", "@sapphire/snowflake": "^3.1.0", "@types/node-fetch": "^2.5.12", - "discord-api-types": "^0.27.0", + "discord-api-types": "^0.29.0", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "tslib": "^2.3.1" diff --git a/packages/rest/src/lib/utils/constants.ts b/packages/rest/src/lib/utils/constants.ts index bc864535023c..c463f3098bed 100644 --- a/packages/rest/src/lib/utils/constants.ts +++ b/packages/rest/src/lib/utils/constants.ts @@ -1,4 +1,4 @@ -import { APIVersion } from 'discord-api-types/v9'; +import { APIVersion } from 'discord-api-types/v10'; import type { RESTOptions } from '../REST'; // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment const Package = require('../../../package.json'); diff --git a/packages/rest/src/lib/utils/utils.ts b/packages/rest/src/lib/utils/utils.ts index 2ea133c0d59e..14f08160142f 100644 --- a/packages/rest/src/lib/utils/utils.ts +++ b/packages/rest/src/lib/utils/utils.ts @@ -1,4 +1,4 @@ -import type { RESTPatchAPIChannelJSONBody } from 'discord-api-types/v9'; +import type { RESTPatchAPIChannelJSONBody } from 'discord-api-types/v10'; import type { Response } from 'node-fetch'; import { RequestMethod } from '../RequestManager'; diff --git a/packages/voice/__tests__/DataStore.test.ts b/packages/voice/__tests__/DataStore.test.ts index d37e8ca88422..1557704efd8d 100644 --- a/packages/voice/__tests__/DataStore.test.ts +++ b/packages/voice/__tests__/DataStore.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/dot-notation */ -import { GatewayOpcodes } from 'discord-api-types/v9'; +import { GatewayOpcodes } from 'discord-api-types/v10'; import * as DataStore from '../src/DataStore'; import * as _AudioPlayer from '../src/audio/AudioPlayer'; import { VoiceConnection } from '../src/VoiceConnection'; diff --git a/packages/voice/examples/basic/adapter.ts b/packages/voice/examples/basic/adapter.ts index 75abc69ce293..6a34e5fccb84 100644 --- a/packages/voice/examples/basic/adapter.ts +++ b/packages/voice/examples/basic/adapter.ts @@ -1,6 +1,6 @@ import { DiscordGatewayAdapterCreator, DiscordGatewayAdapterLibraryMethods } from '../../'; import { VoiceChannel, Snowflake, Client, Constants, Guild } from 'discord.js'; -import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v9'; +import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10'; const adapters = new Map(); const trackedClients = new Set(); diff --git a/packages/voice/package.json b/packages/voice/package.json index 397c384ca38e..fa36b7b87dd8 100644 --- a/packages/voice/package.json +++ b/packages/voice/package.json @@ -51,7 +51,7 @@ "homepage": "https://discord.js.org", "dependencies": { "@types/ws": "^8.2.2", - "discord-api-types": "^0.27.0", + "discord-api-types": "^0.29.0", "prism-media": "^1.3.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.3.1", diff --git a/packages/voice/src/DataStore.ts b/packages/voice/src/DataStore.ts index 9764323d0eae..c114bd857ff7 100644 --- a/packages/voice/src/DataStore.ts +++ b/packages/voice/src/DataStore.ts @@ -1,4 +1,4 @@ -import { GatewayOpcodes } from 'discord-api-types/v9'; +import { GatewayOpcodes } from 'discord-api-types/v10'; import type { AudioPlayer } from './audio'; import type { VoiceConnection } from './VoiceConnection'; diff --git a/packages/voice/src/VoiceConnection.ts b/packages/voice/src/VoiceConnection.ts index a640f97295f0..824bd257ed0f 100644 --- a/packages/voice/src/VoiceConnection.ts +++ b/packages/voice/src/VoiceConnection.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ -import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v9'; +import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10'; import type { CreateVoiceConnectionOptions } from '.'; import type { AudioPlayer } from './audio/AudioPlayer'; import type { PlayerSubscription } from './audio/PlayerSubscription'; diff --git a/packages/voice/src/util/adapter.ts b/packages/voice/src/util/adapter.ts index a76abb68c4a8..a04e496e152c 100644 --- a/packages/voice/src/util/adapter.ts +++ b/packages/voice/src/util/adapter.ts @@ -1,4 +1,4 @@ -import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v9'; +import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10'; /** * Methods that are provided by the @discordjs/voice library to implementations of diff --git a/yarn.lock b/yarn.lock index 2d177f4a3cda..8c9a405c9f56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1764,7 +1764,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.11.0 "@typescript-eslint/parser": ^5.11.0 babel-plugin-transform-typescript-metadata: ^0.3.2 - discord-api-types: ^0.27.3 + discord-api-types: ^0.29.0 eslint: ^8.9.0 eslint-config-marine: ^9.3.2 eslint-config-prettier: ^8.3.0 @@ -1852,7 +1852,7 @@ __metadata: "@typescript-eslint/parser": ^5.11.0 babel-plugin-const-enum: ^1.2.0 babel-plugin-transform-typescript-metadata: ^0.3.2 - discord-api-types: ^0.27.0 + discord-api-types: ^0.29.0 eslint: ^8.9.0 eslint-config-marine: ^9.3.2 eslint-config-prettier: ^8.3.0 @@ -1892,7 +1892,7 @@ __metadata: "@types/ws": ^8.2.2 "@typescript-eslint/eslint-plugin": ^5.11.0 "@typescript-eslint/parser": ^5.11.0 - discord-api-types: ^0.27.0 + discord-api-types: ^0.29.0 eslint: ^8.9.0 eslint-config-marine: ^9.3.2 eslint-config-prettier: ^8.3.0 @@ -4415,17 +4415,10 @@ __metadata: languageName: node linkType: hard -"discord-api-types@npm:^0.27.0": - version: 0.27.1 - resolution: "discord-api-types@npm:0.27.1" - checksum: 5e3473eb01eb3e7ed2b1313513f165644dc70f1f64fb130a50b40394b41c97b1202f4de00b17df34a9f0916269595a091421955bb1e8dbd8e0475637512f2057 - languageName: node - linkType: hard - -"discord-api-types@npm:^0.27.3": - version: 0.27.3 - resolution: "discord-api-types@npm:0.27.3" - checksum: c22d87e787fae6cffd9d23972a3d196d4b43f2fb6deeed50181e7c9d4e823a4fd30a3e1d0e0b3b48a7c284ae2b39fbe960dee988375c7d4072df445f30ac440e +"discord-api-types@npm:^0.29.0": + version: 0.29.0 + resolution: "discord-api-types@npm:0.29.0" + checksum: 1ca74693b4e9c611c3de17f604714425d81d537ee81669d040a8c37fb23fb634a6918dd7d21056ccb90a3f4741bc2750509f6c8dd922bf2b3ed544d18bd0f32a languageName: node linkType: hard @@ -4440,7 +4433,7 @@ __metadata: "@sapphire/snowflake": ^3.1.0 "@types/node": ^16.11.24 "@types/ws": ^8.2.2 - discord-api-types: ^0.27.3 + discord-api-types: ^0.29.0 dtslint: ^4.2.1 eslint: ^8.9.0 eslint-config-prettier: ^8.3.0