mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
feat: add support for autocomplete interactions (#6672)
Co-authored-by: Suneet Tipirneni <suneettipirneni@icloud.com>
This commit is contained in:
@@ -160,6 +160,14 @@ class Interaction extends Base {
|
||||
return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND && typeof this.targetId !== 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this interaction is an {@link AutocompleteInteraction}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isAutocomplete() {
|
||||
return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this interaction is a {@link MessageComponentInteraction}.
|
||||
* @returns {boolean}
|
||||
|
||||
Reference in New Issue
Block a user