Skip to content

Commit 9b606ce

Browse files
committed
reference/funcs: document deleteInteractionResponse
See botlabs-gg/yagpdb#1722. Signed-off-by: Luca Zeuch <[email protected]>
1 parent d956364 commit 9b606ce

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

content/docs/reference/templates/functions.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ about using interactions, [see here](/docs/reference/custom-interactions).
523523

524524
{{< /callout >}}
525525

526-
#### Interaction Responses
526+
### Interaction Responses
527527

528528
- Only one interaction response may be sent to each interaction.
529529
- If you do not send an interaction response, members will see "This application did not respond" on Discord.
@@ -599,7 +599,7 @@ The following example must be triggered by a component or modal submission.
599599

600600
Same as [updateMessage](#updatemessage), plus it does not escape mentions.
601601

602-
#### Interaction Followups
602+
### Interaction Followups
603603

604604
- Interaction followups may be sent up to 15 minutes after an interaction.
605605
- To send a followup, you must have the interaction token of the interaction you are following up.
@@ -683,7 +683,7 @@ Same as [sendResponseNoEscape](#sendresponsenoescape), but also returns the mess
683683

684684
Same as [sendResponse](#sendresponse), but also returns the message ID.
685685

686-
#### Interaction Miscellaneous
686+
### Interaction Miscellaneous
687687

688688
#### cbutton
689689

@@ -743,6 +743,21 @@ Creates a [modal object][modals] for use in interactions. See [`sendModal`](#sen
743743

744744
[modals]: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
745745

746+
#### deleteInteractionResponse
747+
748+
```yag
749+
{{ deleteInteractionResponse <interactionToken> <messageID> [delay] }}
750+
```
751+
752+
Deletes the specified response or follow-up message.
753+
754+
- `interactionToken`: a valid interaction token or `nil` for the triggering interaction.
755+
- `messageID`: valid message ID of a follow-up, or `nil` for the original interaction response.
756+
- `delay`: an optional delay in seconds, max 10 seconds. Default: 10 seconds.
757+
758+
If you require a delay of more than 10 seconds, consider using `execCC` for deletion of an ephemeral response, or
759+
`deleteMessage` to delete a regular interaction response.
760+
746761
#### ephemeralResponse
747762

748763
```yag

0 commit comments

Comments
 (0)