mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
types(interaction): remove renamed typeguards (#7220)
This commit is contained in:
5
packages/discord.js/typings/index.d.ts
vendored
5
packages/discord.js/typings/index.d.ts
vendored
@@ -1319,16 +1319,13 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
|||||||
public inGuild(): this is Interaction<'raw' | 'cached'>;
|
public inGuild(): this is Interaction<'raw' | 'cached'>;
|
||||||
public inCachedGuild(): this is Interaction<'cached'>;
|
public inCachedGuild(): this is Interaction<'cached'>;
|
||||||
public inRawGuild(): this is Interaction<'raw'>;
|
public inRawGuild(): this is Interaction<'raw'>;
|
||||||
public isApplicationCommand(): this is CommandInteraction<Cached>;
|
|
||||||
public isButton(): this is ButtonInteraction<Cached>;
|
public isButton(): this is ButtonInteraction<Cached>;
|
||||||
public isCommand(): this is CommandInteraction<Cached>;
|
public isCommand(): this is CommandInteraction<Cached>;
|
||||||
public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>;
|
public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>;
|
||||||
public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>;
|
public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>;
|
||||||
public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
|
public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
|
||||||
public isAutocomplete(): this is AutocompleteInteraction<Cached>;
|
public isAutocomplete(): this is AutocompleteInteraction<Cached>;
|
||||||
public isContextMenu(): this is ContextMenuCommandInteraction<Cached>;
|
public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
|
||||||
public isUserContextMenu(): this is UserContextMenuCommandInteraction<Cached>;
|
|
||||||
public isMessageContextMenu(): this is MessageContextMenuCommandInteraction<Cached>;
|
|
||||||
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
|
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
|
||||||
public isSelectMenu(): this is SelectMenuInteraction<Cached>;
|
public isSelectMenu(): this is SelectMenuInteraction<Cached>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -963,7 +963,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
expectNotAssignable<Interaction<'cached'>>(interaction);
|
expectNotAssignable<Interaction<'cached'>>(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interaction.isContextMenu()) {
|
if (interaction.isContextMenuCommand()) {
|
||||||
expectType<ContextMenuCommandInteraction>(interaction);
|
expectType<ContextMenuCommandInteraction>(interaction);
|
||||||
if (interaction.inCachedGuild()) {
|
if (interaction.inCachedGuild()) {
|
||||||
expectAssignable<ContextMenuCommandInteraction>(interaction);
|
expectAssignable<ContextMenuCommandInteraction>(interaction);
|
||||||
@@ -978,7 +978,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interaction.isMessageContextMenu()) {
|
if (interaction.isMessageContextMenuCommand()) {
|
||||||
expectType<Message | APIMessage>(interaction.targetMessage);
|
expectType<Message | APIMessage>(interaction.targetMessage);
|
||||||
if (interaction.inCachedGuild()) {
|
if (interaction.inCachedGuild()) {
|
||||||
expectType<Message<true>>(interaction.targetMessage);
|
expectType<Message<true>>(interaction.targetMessage);
|
||||||
|
|||||||
Reference in New Issue
Block a user