| Name | discordinteraction |
| Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
| Syntax | discordinteraction [defer/defer_update/reply/update/edit/delete] [interaction:<interaction>] (ephemeral) (rows:<rows>) (<message>) (embed:<embed>|...) (attach_files:<map>) |
| Short Description | Manages Discord interactions. |
| Full Description | Manages Discord interactions.
You can defer, defer_update, reply to, update, edit, or delete an interaction. These instructions all require the 'interaction' argument. The 'ephemeral' argument can be used to have the reply message be visible to that one user. 'defer' acknowledges an interaction with the normal 'Thinking...' state before a later reply, which is useful if your reply may take more than a few seconds to be selected. If you defer, the 'ephemeral' option can only be set by the defer - you cannot change it with the later reply. 'defer_update' acknowledges a component interaction without a loading state, allowing its original message to be edited later. 'reply' provides the initial interaction response, or sends a followup after the interaction has been acknowledged. It uses similar logic to normal messaging. See discordmessage. 'update' immediately updates the message associated with a component interaction as its initial response. 'edit' edits the interaction's original response through its interaction hook. 'delete' deletes the interaction's original response through its interaction hook. If you deferred without using 'ephemeral', the 'delete' option will delete the 'Thinking...' message. Ephemeral replies cannot have files. Slash commands, and replies to interactions, have limitations. See https://gist.github.com/MinnDevelopment/b883b078fdb69d0e568249cc8bf37fe9. Generally used alongside discordcommand The command can be ~waited for. See ~waitable. |
| Related Tags | <entry[saveName].command> returns the DiscordCommandTag of a slash command upon creation, when the command is ~waited for.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordInteractionCommand.java#L32 |