dc_respond_interaction
dc_respond_interaction(interaction, type, content?)
#
Sends a response to an interaction.
Blocking function
Invoking this function can freeze the game.
Use it in a task
to avoid freezing your game.
Input parameters#
Parameter | Type | Description |
---|---|---|
interaction |
Any interaction | The interaction to respond to. |
type |
String | The type of response to use. |
content |
(See response types) | The content of the response. |
Response types#
String | Description |
---|---|
RESPOND_LATER |
Tells that the interaction was received, and a response will come later. You will then need to send a RESPOND_FOLLOWUP response within 15 minutes.This does not require the content parameter. |
RESPOND_IMMEDIATELY |
Sends an immediate response which has to come within 3 seconds. The content parameter requires a Message content for this. |
RESPOND_FOLLOWUP |
Sends a followup response for RESPOND_LATER .The content parameter requires a Message content for this. |
RESPOND_MODAL |
Opens a modal for the user. The content parameter requires a Modal parsable for this. |
Output values#
Return values#
- Null, if successful.
- The message that was sent, if using the
RESPOND_FOLLOWUP
type.
Uncaught exceptions #
- Throws an exception on failure.