mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: general component improvements (#5787)
This commit is contained in:
@@ -120,6 +120,14 @@ class Interaction extends Base {
|
||||
isMessageComponent() {
|
||||
return InteractionTypes[this.type] === InteractionTypes.MESSAGE_COMPONENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this interaction is a button interaction.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isButton() {
|
||||
return InteractionTypes[this.type] === InteractionTypes.MESSAGE_COMPONENT && this.componentType === 'BUTTON';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Interaction;
|
||||
|
||||
Reference in New Issue
Block a user