Skip to main content

Custom Reactions

The Custom Reactions module enables users to set up custom bot reactions and build pseudo-commands in a server.

Server-wide Settings

Note

Toggling the module on/off for the whole server, and verbose mode (which prepends each triggered reaction with its ID), are configured from your server's Custom Reactions page on the dashboard.

/customreactions add

Command Syntax

/customreactions add [anywhere:{true/false}] [dm:{true/false}] [delete:{true/false}] [global:{true/false}]

Command Description

Opens a form to add a new custom reaction for the current server. The trigger text and response text are entered as the form's two fields, not as command options.

Optional Parameters:

  • anywhere: Triggers the reaction based on a text that appears anywhere in a message, instead of starting with the trigger text. Default: off.
  • dm: Sends the response text via DM instead of using the current channel. Default: off.
  • delete: Deletes the original message after a reaction is triggered. Default: off.
  • global: Bot Owner. Makes the custom reaction global, hence triggering in any server the bot is. Default: off.

Note

Restricting a reaction to (or excluding it from) a set of roles, and requiring all vs. any one of those roles, are not options on this command - they're set per-reaction from that reaction's editor on your server's Custom Reactions page on the dashboard, after creating it here.

You can use one (or more) of these placeholders in your response message:

  • %user%: This will be replaced with a mention of the user.
  • %username%: This will be replaced with the username of the user, without the discriminator (e.g. cycloptux).
  • %discriminator%: This will be replaced with the discriminator of the user, without the # character (e.g. 1543).
  • %fullusername%: This will be replaced with the username of the user, including the discriminator (e.g. cycloptux#1543).
  • %user_avatar_url%: This will be replaced with the current user global avatar URL (in WebP or GIF format).
  • %user_server_avatar_url%: This will be replaced with the current user server avatar URL, if set, or the global avatar URL (in WebP or GIF format).
  • %bot%: This will be replaced with a mention of the bot.
  • %botname%: This will be replaced with the username of the bot, without the discriminator.
  • %botdiscriminator%: This will be replaced with the discriminator of the bot, without the # character.
  • %fullbotname%: This will be replaced with the username of the bot, including the discriminator.
  • %bot_avatar_url%: This will be replaced with the current bot avatar URL (in WebP or GIF format).
  • %server%: This will be replaced with the server name.
  • %channel%: This will be replaced with the channel name.
  • %now%: This will be replaced with the current time, with format YYYY-MM-DD HH:mm:ss (UTC).
  • %now_iso%: This will be replaced with the current time, as ISO8601 string.
  • %server_time%: This will be replaced with the current time, with format HH:mm UTC.
  • %server_icon_url%: This will be replaced with the current server icon URL (in WebP or GIF format).
  • %server_banner_url%: This will be replaced with the current server icon URL (in WebP format).
  • %server_splash_url%: This will be replaced with the current server icon URL (in WebP format).
  • %server_member_count%: This will be replaced with the current amount of members in the server.
  • %boost_level%: This will be replaced with the current Nitro Server Boost level for the server.
  • %boost_number%: This will be replaced with the current number of Nitro Server Boosts that the server received.
  • %target%: This will be replaced with anything the user wrote after the trigger.

You can use embed json built with Discohook instead of a regular text in the response field, if you want the message to be embedded.

Note

Both the trigger text and the response text are typed into the form Discord shows after you run the command, not as /customreactions add options.

Permissions Needed

  • User: None.

Examples

/customreactions add anywhere:true

/customreactions edit

Command Syntax

/customreactions edit id:{reaction id} [anywhere:{true/false}] [dm:{true/false}] [delete:{true/false}] [global:{true/false}]

Command Description

Opens a form, pre-filled with the current trigger and response text, to edit an existing custom reaction for the current server. Global custom reactions can only be edited by the bot owner.

An anywhere/dm/delete/global option directly sets the corresponding flag to the value you give it; omit an option to leave it unchanged.

Note

Both fields in the edit form are required: you must re-submit (or leave pre-filled) both the trigger and the response text, even if you only want to change one of them or one of the boolean options above.

Permissions Needed

  • User: None.

Examples

/customreactions edit id:1 delete:true

/customreactions show

Command Syntax

/customreactions show id:{reaction id}

Command Description

Prints the current configuration for a specific custom reaction. It will also preview how the reaction is printed when triggered in a server (placeholders will not be replaced in this preview).

The id option autocompletes against the reactions you have access to as you type.

Permissions Needed

  • User: None.

Examples

/customreactions show id:3

/customreactions list

Command Syntax

/customreactions list [filter:{text}] [alphabetical:{true/false}] [global:{true/false}]

Command Description

Lists all available custom reactions in the current server. Setting global to true will show the list of global reactions instead. Setting alphabetical to true will show the list of reactions in alphabetical order (by trigger); the default order is by ID.

Using the filter option will filter on reactions that are triggered by the given text.

Permissions Needed

  • User: None.

Examples

/customreactions list
/customreactions list filter:hello alphabetical:true

/customreactions delete

Command Syntax

/customreactions delete id:{reaction id}

Command Description

Deletes a specific custom reaction. Global custom reactions can only be deleted by the bot owner.

Note

Only one ID at a time can be deleted per command run; run /customreactions delete once per ID to delete several.

Permissions Needed

  • User: None.

Examples

/customreactions delete id:3

Clearing all custom reactions

Deleting all of a server's custom reactions at once is done from your server's Custom Reactions page on the dashboard. Global custom reactions can still only be deleted by the bot owner.

On the Dashboard

Your server's Custom Reactions page covers everything above in one place, plus per-reaction role restriction that has no slash-command equivalent:

  • Settings - the Custom Reactions Enabled and Verbose Mode toggles, with a Save button.
  • Reactions - a table of every reaction (ID, trigger, response, flags), with Add Reaction and, per row, Edit/Delete. The editor form has the trigger and response fields (with a placeholder-insert dropdown for the response), Trigger Anywhere in Message/Send to DM/Delete Original Message checkboxes, a Role Restrictions multi-select, and Exclude These Roles Instead of Restricting to Them / Require All Selected Roles checkboxes.
  • Danger Zone - Clear All Reactions, which deletes every custom reaction on the server at once.

See also

Full migration mapping for these commands: Migration Guide.