Constructor
new UnknownInteraction()
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
|
<nullable> |
The channel the interaction was created in. Can be partial with only the id if the channel is not cached. |
data |
Object
|
<nullable> |
The data attached to the interaction |
guildID |
String
|
<nullable> |
The ID of the guild in which the interaction was created |
member |
Member
|
<nullable> |
The member who triggered the interaction (This is only sent when the interaction is invoked within a guild) |
message |
Message
|
<nullable> |
The message the interaction came from (Message Component only). If the message is ephemeral, this will be an object with |
user |
User
|
<nullable> |
The user who triggered the interaction (This is only sent when the interaction is invoked within a dm) |
- Source:
Extends
Methods
(async) acknowledge(data) → {Promise}
Acknowledges the autocomplete interaction with a result of choices. Note: You can not use more than 1 initial interaction response per interaction.
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
The data object
|
Returns:
- Type:
-
Promise
(async) createFollowup(content, fileopt) → {Promise.<?Message>}
Respond to the interaction with a followup message
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
String
|
Object
|
A string or object. If an object is passed:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options.embeds |
Array.<Object>
|
<optional> |
An array of embed objects. See the official Discord API documentation entry for object structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
content.flags |
Number
|
<optional> |
64 for Ephemeral |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
content.poll |
Object
|
<optional> |
A poll object. See the official Discord API documentation entry for object structure |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
content.tts |
Boolean
|
<optional> |
Set the message TTS flag |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise.<?Message>
(async) createMessage(content, fileopt) → {Promise}
Acknowledges the interaction with a message. If already acknowledged runs createFollowup Note: You can not use more than 1 initial interaction response per interaction, use createFollowup if you have already responded with a different interaction response.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
String
|
Object
|
A string or object. If an object is passed:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise
(async) defer(flagsopt) → {Promise}
Acknowledges the interaction with a defer response Note: You can not use more than 1 initial interaction response per interaction.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
flags |
Number
|
<optional> |
64 for Ephemeral |
Returns:
- Type:
-
Promise
(async) deferUpdate() → {Promise}
Acknowledges the interaction with a defer message update response (Message Component only) Note: You can not use more than 1 initial interaction response per interaction.
- Source:
Returns:
- Type:
-
Promise
(async) deleteMessage(messageID) → {Promise}
Delete a message
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
messageID |
String
|
the id of the message to delete, or "@original" for the original response. |
Returns:
- Type:
-
Promise
(async) deleteOriginalMessage() → {Promise}
Delete the Original message (or the parent message for components) Warning: Will error with ephemeral messages.
- Source:
Returns:
- Type:
-
Promise
(async) editMessage(messageID, content, fileopt) → {Promise.<Message>}
Edit a message
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
messageID |
String
|
the id of the message to edit, or "@original" for the original response. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
content |
Object
|
Interaction message edit options
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise.<Message>
(async) editOriginalMessage(content, fileopt) → {Promise.<Message>}
Edit the Original response message
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
Object
|
Interaction message edit options (or the parent message for components)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise.<Message>
(async) editParent(content, fileopt) → {Promise}
Acknowledges the interaction by editing the parent message. If already acknowledged runs editOriginalMessage (Message Component only) Note: You can not use more than 1 initial interaction response per interaction, use edit if you have already responded with a different interaction response. Warning: Will error with ephemeral messages.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
String
|
Object
|
What to edit the message with
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file |
Object
|
Array.<Object>
|
<optional> |
A file object (or an Array of them)
|
Returns:
- Type:
-
Promise
(async) getOriginalMessage() → {Promise.<Message>}
Get the Original response message (or the parent message for components) Warning: Will error with ephemeral messages.
- Source:
Returns:
- Type:
-
Promise.<Message>
(async) pong() → {Promise}
Acknowledges the ping interaction with a pong response (Ping Only) Note: You can not use more than 1 initial interaction response per interaction.
- Source:
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.
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
choices |
Array.<Object>
|
The autocomplete choices to return to the user
|
Returns:
- Type:
-
Promise