Constructor
new ModalSubmitInteraction()
Properties:
| Name | Type | Attributes | Description | |||||
|---|---|---|---|---|---|---|---|---|
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 | Description |
|---|---|---|
custom_id |
String
|
The ID of the Modal |
components |
Array.<Object>
|
The values submitted by the user |
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() → {Promise}
Acknowledges the interaction with a defer message update response
Returns:
- Type:
-
Promise
(async) createFollowup(content, fileopt) → {Promise.<?Message>}
Respond to the interaction with a followup message
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
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
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 Note: You can not use more than 1 initial interaction response per interaction
Returns:
- Type:
-
Promise
(async) deleteMessage(messageID) → {Promise}
Delete a message
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 parent message Warning: Will error with ephemeral messages
Returns:
- Type:
-
Promise
(async) editMessage(messageID, content, fileopt) → {Promise.<Message>}
Edit a message
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 parent message
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
Object
|
Interaction message edit options
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 Warning: Will error with ephemeral messages
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