---
url: https://docs.juniper.bot/en/cmd/custom.md
description: You can create your own commands that can perform certain actions.
---

# 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](../../guide#configure) 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 { #interface }

Each command has a certain set of general settings:

![custom](./custom.png)

* **Command** — the name of the command that will be used to invoke it in Discord;
* **Command Action** — default [action](actions/index) 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;
* **Group** — the name of the group that will be used to group commands list on the dashboard;
* **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](#context-menus) section.
* **Slash Command** — allows enabling and setting up this command as slash command. More detailed explanation is in [Slash Command](#slash) section.

## Context Menus { #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`](../../message-templates/types/discord/message) variable;
* In case of member context menu, action template will get an instance of this member as [`arguments.targetMember`](../../message-templates/types/custom-commands/arguments);

::: warning Limitations
Context Menus have some limitations:

1. Up to 15 message context menus;
2. Up to 15 member context menus.
   :::

## Slash Command { #slash }

Custom Command can be enabled as [Slash Command](../slash/index) 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`](../../message-templates/types/custom-commands/arguments) variable.

Use following syntax to get option's value:

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

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

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

More detailed information about described at [Arguments](../../message-templates/types/custom-commands/arguments) data type.

::: warning Limitations
Slash Commands have some limitations:

1. All limitations described in [Slash Commands](../slash/index#limitations) 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 { #hotkeys }

Command create/edit dialog supports following hotkeys:

* &#x20;— quick save;
* &#x20;— full screen mode of focused template textarea.
