feat: add support for autocomplete interactions (#6672)

Co-authored-by: Suneet Tipirneni <suneettipirneni@icloud.com>
This commit is contained in:
Micah Benac
2021-10-28 18:47:50 -04:00
committed by GitHub
parent 14d9a9901b
commit ddf759c811
14 changed files with 224 additions and 16 deletions

View File

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