Skip to content

Custom Commands

You can create your own commands that can perform certain actions.


Custom commands can be created and configured at the server's dashboard in the tab called "Commands". You can disable any custom command if necessary and configure the necessary access rights in the same way as the built-in bot commands.


Settings Interface#

Each command has a certain set of general settings:

custom

Custom Commands Settings Interface
  • Command — the name of the command that will be used to invoke it in Discord;

  • Command Action — default action that will be executed for this command;

  • Short description — just a short description of this command. It will be displayed in the list of custom commands, as well as in the help command in the Discord;

  • Access Rights and Execution — this section contains access rights settings by roles, channels, channel types and how often this command can be invoked (cooldown).

  • Context Menus — allows enabling and setting up this command as context menus action. More detailed explanation is in Context Menus section.

  • Slash Command — allows enabling and setting up this command as slash command. More detailed explanation is in Slash Command section.


Context Menus#

Custom Command can be enabled as context menus action for member and/or message:

  • In case of message context menu, action template will get an instance of this message as message variable;
  • In case of member context menu, action template will get an instance of this member as arguments.targetMember;

Limitations

Context Menus have some limitations:

  1. Up to 5 message context menu;

  2. Up to 5 member context menu.


Slash Command#

Custom Command can be enabled as Slash Command with customizable options and even subcommands. The slash command settings interface is intuitive and self-explanatory.

All user-entered slash command options are passed into custom command action as part of arguments variable.

Use following syntax to get option's value:

{{ arguments.getOption('option_name') }}

Also, you can get list of all options of the specified type:

{{ arguments.getOptionsByType('MEMBER') }}

More detailed information about described at Arguments data type.

Limitations

Slash Commands have some limitations:

  1. All limitations described in Slash Commands article;

  2. Root slash command can only have either subcommands or options but not both at the same time;

  3. Up to 25 options for root command and subcommands;

  4. Up to 25 subcommands;

  5. Up to 25 choices for string or number options;

  6. Up to 100 Custom Commands with Slash Command enabled.


Hotkeys#

Command create/edit dialog supports following hotkeys:

  • Сtrl+S — quick save;

  • F11 — full screen mode of focused template textarea.