Deletes a Discord entity: a message, a role, any channel, a custom emoji, a webhook, a scheduled event, a guild sticker or an automod rule.
To delete several messages at once, use the purge effect instead.
Global, non-entity effects, usable anywhere in your scripts.
Deletes a Discord entity: a message, a role, any channel, a custom emoji, a webhook, a scheduled event, a guild sticker or an automod rule.
To delete several messages at once, use the purge effect instead.
Posts a text, an embed, a component or a poll in a message channel.
The sent message is discarded; build a message and read 'the result of' it to keep it.
Bans a user ID from a guild without retrieving the member first.
Works on users who already left the guild.
Deletes a message that was sent through a webhook, by its message or its id.
A webhook can only delete its own messages. Name the thread when the message lives in one.
Edits a message that was sent through a webhook, by its message or its id.
A webhook can only edit its own messages. Name the thread when the message lives in one.
Runs an effect on a background thread and waits for it to fully complete before continuing.
On a DiSky REST property change this blocks until Discord confirms the change (instead of fire-and-forget); on a dual cache/online property read it uses the online value.
Redundant on effects that are already async.
Connects a configured bot to Discord under the given name. Validation/phase errors are reported cleanly.
Disconnects the given bot(s) from Discord and unloads them. The bot can be logged in again afterwards.
Replies to the current event: in a message event the reply is posted in the event's channel, in an interaction event (slash command, button, ...) it answers the interaction.
'hidden' makes an interaction reply ephemeral (only the user who triggered it sees it); it is ignored outside interactions.
'with reference' links the reply to a message, like Discord's own reply feature.
A message builder can be replied with too: its content, embeds, attachments and poll are sent, its own channel is ignored. A component (a container, a row, a button...) is sent on its own.
Opens a modal for the user who triggered the current interaction: a button click, a dropdown click or a slash command. It is the interaction's answer, so nothing else may have replied or deferred it before, and a modal cannot answer another modal.
What the user submits comes back in 'on modal received'.
Acknowledges the current interaction without answering it yet, which buys up to 15 minutes to reply instead of the 3 seconds Discord gives by default. A later 'reply with' goes through the deferred answer.
'hidden' makes the eventual reply ephemeral. 'and edit' (on a button or dropdown click) acknowledges without any 'thinking...' state, for when the script will only edit the message.
Replaces every component of the message whose button or dropdown was just clicked, as the answer to that interaction (or through it, if it was deferred 'and edit').
Bare buttons are grouped into rows like on a message builder. Pass nothing to strip the components.
Swaps one component of a sent message, found by its text id (a button, a dropdown) or its unique id (any component, including text displays and sections inside a container), for a new one. Every other component is kept as it is.
Inside a button or dropdown click on that same message, the edit is the interaction's answer.
Replaces every application command of a bot (globally) or of a guild with the given ones: what is not in the list is removed from Discord. This is the one call to make from 'on ready' / 'on guild ready'.
Global commands take up to an hour to show up for users; guild commands are immediate. Discord limits how often a guild's command list can be replaced (200 times a day).
Once done, 'command id of' each command is known.
Adds or replaces (by name) one or more application commands of a bot (globally) or of a guild, leaving the other registered commands alone. Use 'update the discord commands' to replace the whole list.
Once done, 'command id of' each command is known.
Removes application commands from a bot (globally) or from a guild: by command object, by name, by id, or all of them.
A command object whose id is known is deleted directly; otherwise the registered commands are looked up and every one with that name (and type, for a command object) is removed.
Sets the name or the description shown to users of a given Discord locale, for an application command, a slash option, a subcommand, a subcommand group or a choice (choices only have a name).
Locales are Discord's codes ("fr", "de", "en-GB", "pt-BR", ...) or language names ("french").
Answers an autocomplete request with up to 25 suggestions and stops the trigger. Give choices, or plain texts / numbers (used as both the label and the value).
Only in 'on slash completion' and in an 'on completion request:' section of a slash command structure.