mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(Interaction): add isApplicationCommand check (#6801)
This commit is contained in:
@@ -136,6 +136,14 @@ class Interaction extends Base {
|
||||
return Boolean(this.guildId && !this.guild && this.member);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this interaction is a {@link BaseCommandInteraction}.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isApplicationCommand() {
|
||||
return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this interaction is a {@link CommandInteraction}.
|
||||
* @returns {boolean}
|
||||
|
||||
Reference in New Issue
Block a user