Constructor
new AutocompleteInteraction()
Properties:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
appPermissions |
Permission
|
<nullable> |
The permissions the app or bot has within the channel the interaction was sent from |
||||||||||||||||||||||||||||||||||||||||
channel |
DMChannel
|
TextChannel
|
NewsChannel
|
The channel the interaction was created in. Can be partial with only the id if the channel is not cached |
|||||||||||||||||||||||||||||||||||||||||
data |
Object
|
The data attached to the interaction |
|||||||||||||||||||||||||||||||||||||||||
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
String
|
The ID of the Application Command |
|
name |
String
|
The command name |
|
options |
Array.<Object>
|
<nullable> |
The run Application Command options |
options[].focused |
Boolean
|
<nullable> |
Whether or not the option is focused |
options[].name |
String
|
The name of the Application Command option |
|
options[].options |
Array.<Object>
|
<nullable> |
The run Application Command options (Mutually exclusive with value) |
options[].type |
Number
|
Command option type, 1-10 |
|
options[].value |
String
|
Number
|
Boolean
|
<nullable> |
The value of the run Application Command (Mutually exclusive with options) |
target_id |
String
|
<nullable> |
The ID the of user or message targetted by a context menu command |
type |
Number
|
The command type |
guildIDString
The ID of the guild in which the interaction was created
memberMember
The member who triggered the interaction (This is only sent when the interaction is invoked within a guild)
userUser
The user who triggered the interaction (This is only sent when the interaction is invoked within a dm)
Extends
Methods
(async) acknowledge(choices) → {Promise}
Acknowledges the autocomplete interaction with a result of choices Note: You can not use more than 1 initial interaction response per interaction
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
choices |
Array.<Object>
|
The autocomplete choices to return to the user
|
Returns:
- Type:
-
Promise
(async) result(choices) → {Promise}
Acknowledges the autocomplete interaction with a result of choices Note: You can not use more than 1 initial interaction response per interaction.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
choices |
Array.<Object>
|
The autocomplete choices to return to the user
|
Returns:
- Type:
-
Promise