From 68b9564f1821726377a1e929a3ca1fc65b4ad598 Mon Sep 17 00:00:00 2001 From: muchnameless <12682826+muchnameless@users.noreply.github.com> Date: Sun, 9 Jan 2022 11:44:24 +0100 Subject: [PATCH] types(interaction): remove renamed typeguards (#7220) --- packages/discord.js/typings/index.d.ts | 5 +---- packages/discord.js/typings/index.test-d.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index e50124ee8..6a104c7c6 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1319,16 +1319,13 @@ export class Interaction extends Base { public inGuild(): this is Interaction<'raw' | 'cached'>; public inCachedGuild(): this is Interaction<'cached'>; public inRawGuild(): this is Interaction<'raw'>; - public isApplicationCommand(): this is CommandInteraction; public isButton(): this is ButtonInteraction; public isCommand(): this is CommandInteraction; public isChatInputCommand(): this is ChatInputCommandInteraction; public isContextMenuCommand(): this is ContextMenuCommandInteraction; public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction; public isAutocomplete(): this is AutocompleteInteraction; - public isContextMenu(): this is ContextMenuCommandInteraction; - public isUserContextMenu(): this is UserContextMenuCommandInteraction; - public isMessageContextMenu(): this is MessageContextMenuCommandInteraction; + public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction; public isMessageComponent(): this is MessageComponentInteraction; public isSelectMenu(): this is SelectMenuInteraction; } diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index ad25e6799..f99106651 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -963,7 +963,7 @@ client.on('interactionCreate', async interaction => { expectNotAssignable>(interaction); } - if (interaction.isContextMenu()) { + if (interaction.isContextMenuCommand()) { expectType(interaction); if (interaction.inCachedGuild()) { expectAssignable(interaction); @@ -978,7 +978,7 @@ client.on('interactionCreate', async interaction => { } } - if (interaction.isMessageContextMenu()) { + if (interaction.isMessageContextMenuCommand()) { expectType(interaction.targetMessage); if (interaction.inCachedGuild()) { expectType>(interaction.targetMessage);