feat(Interaction): add isApplicationCommand check (#6801)

This commit is contained in:
Hackerboi 69
2021-10-12 21:11:32 +02:00
committed by GitHub
parent 460df9eb4d
commit 6898fa3b37
2 changed files with 9 additions and 0 deletions

View File

@@ -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}