types(interaction): remove renamed typeguards (#7220)

This commit is contained in:
muchnameless
2022-01-09 11:44:24 +01:00
committed by GitHub
parent 962f4bf882
commit 68b9564f18
2 changed files with 3 additions and 6 deletions

View File

@@ -1319,16 +1319,13 @@ export class Interaction<Cached extends CacheType = CacheType> 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<Cached>;
public isButton(): this is ButtonInteraction<Cached>;
public isCommand(): this is CommandInteraction<Cached>;
public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>;
public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>;
public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
public isAutocomplete(): this is AutocompleteInteraction<Cached>;
public isContextMenu(): this is ContextMenuCommandInteraction<Cached>;
public isUserContextMenu(): this is UserContextMenuCommandInteraction<Cached>;
public isMessageContextMenu(): this is MessageContextMenuCommandInteraction<Cached>;
public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
public isSelectMenu(): this is SelectMenuInteraction<Cached>;
}

View File

@@ -963,7 +963,7 @@ client.on('interactionCreate', async interaction => {
expectNotAssignable<Interaction<'cached'>>(interaction);
}
if (interaction.isContextMenu()) {
if (interaction.isContextMenuCommand()) {
expectType<ContextMenuCommandInteraction>(interaction);
if (interaction.inCachedGuild()) {
expectAssignable<ContextMenuCommandInteraction>(interaction);
@@ -978,7 +978,7 @@ client.on('interactionCreate', async interaction => {
}
}
if (interaction.isMessageContextMenu()) {
if (interaction.isMessageContextMenuCommand()) {
expectType<Message | APIMessage>(interaction.targetMessage);
if (interaction.inCachedGuild()) {
expectType<Message<true>>(interaction.targetMessage);