Custom commands
PremiumCreate commands that reply with the text of your choice.
At a glance
- Availability
- Premium
- In the portal
- Community › Custom commands
Overview
A custom command displays a text that you wrote in advance, for example the rules, your community's useful links or the answer to a frequently asked question. Your members call it with /custom-command, or by writing its name preceded by a prefix, such as !regles.
Ammit only posts this text. It replaces only the variables it recognises and never runs anything else.
How it works
When a member uses /custom-command and chooses a command in the name option, Ammit posts the reply in the channel, visible to everyone. While they type, Discord offers the server's commands whose name contains the text already typed.
If you chose a Custom command prefix, a member can also write that prefix followed by the command name at the start of a message. Ammit then replies with a new message in the same channel. The text that follows the name is ignored.
- The command name is recognised regardless of capital letters.
- With the Boxed reply option, the reply is posted in a box, with its title and its colour. Without this option, Ammit posts the text alone.
- A command restricted to roles only replies to members who have one of those roles, and to members who have the Administrator permission. With /custom-command, others receive an error message visible only to them. With the prefix, Ammit does not reply.
- Only the author of the command can be notified, through the {membre} variable. Other mentions, such as @everyone or a role mention, are displayed without notifying anyone.
- Messages from bots and webhooks never trigger a command.
- Ammit counts each use. This number appears next to the command's name in the portal.
Ammit replaces the following variables when replying.
| Variable | Value shown |
|---|---|
| The mention of the author of the command, who receives a notification. | |
| The name of the author of the command, without a mention. | |
| Your server's name. | |
| The mention of the channel where the command is used. | |
| The number of members of the server. |
Configuration
In your server's menu, open Custom commands, in the Community section.
- Turn on the switch at the top of the page. It is saved as soon as you change it.
- If you want a prefix, enter it in Custom command prefix, then click Save changes in the bar that appears at the bottom of the screen.
- In Your commands, unfold New command.
- Enter the Command name. It is 1 to 32 characters long, from lowercase letters without accents, digits, the hyphen and the underscore.
- Write the Reply. You can insert the variables described above.
- To post the reply in a box, tick Boxed reply, then enter a Title and a Colour if you wish. With no colour chosen, the box takes the Embed color set in Settings, or failing that Ammit's usual colour. The Colour field shows it as an example.
- To limit the command to certain roles, select them in Restricted to roles. With no role chosen, all members can use it.
- Click Save. The command can be used in Discord right away.
To edit a command, expand it in the Your commands list, make your changes, then click Save. The Delete button removes the command after confirmation. Two commands on the server cannot have the same name.
Settings
Prefix
Choose the character placed before command names.
| Setting | Description | Default value |
|---|---|---|
| Custom commandsPremium | Disabled | |
| Custom command prefix | For example “!” for “!regles”. Leave empty to use /custom-command only. | None |
Usage
Type /custom-command, then start entering the name in the name option. Choose the command from the list offered by Discord and confirm.
With the ! prefix, a member simply writes !regles in a channel. Ammit replies right away with the text of the regles command.
Custom commands do not appear one by one in Discord's command list. Only /custom-command appears there.
Discord commands
| Discord command | What it does and options | Required permissions |
|---|---|---|
| Show a custom command of the server | None | |
| Regularly delete a channel's old messages | Edit access to the Custom commands page (default: Administrator or Manage Server) Manage Messages | |
| List channels cleaned automatically | Read access to the Custom commands page (default: Administrator or Manage Server) | |
| Stop cleaning a channel | Edit access to the Custom commands page (default: Administrator or Manage Server) | |
| React automatically to a channel's messages | Edit access to the Custom commands page (default: Administrator or Manage Server) | |
| List automatic reactions | Read access to the Custom commands page (default: Administrator or Manage Server) | |
| Stop a channel's automatic reactions | Edit access to the Custom commands page (default: Administrator or Manage Server) | |
| Reply automatically to a keyword | Edit access to the Custom commands page (default: Administrator or Manage Server) | |
| List automatic replies | Read access to the Custom commands page (default: Administrator or Manage Server) | |
| Delete an automatic reply | Edit access to the Custom commands page (default: Administrator or Manage Server) |
Required permissions
To reply to a message that starts with the prefix, Ammit needs the View Channels and Send Messages permissions in the channel. A boxed reply also requires Embed Links.
In the portal, the server owner and administrators configure custom commands. The access of other roles and members is set in Team and access. In Discord, the /config set command can also turn the feature on or change the prefix, with the same accesses. The commands themselves can only be created in the portal.
In Discord, /custom-command is open to all members, within the limit of the roles chosen for each command.
Free version and Premium
| Feature | Free | Premium |
|---|---|---|
| Custom commands | Not included | 100 |
Limits
- The reply is 2,000 characters at most, and its title 256.
- The prefix is at most 3 characters long.
- A command only posts its reply. It assigns no role and contains no image or file.
- The number of commands depends on your plan, as shown in the Free version and Premium table.
Without Premium, your commands are kept, but Ammit no longer replies to them. They work again as soon as the server has Premium again.
Frequently asked questions
Why does Ammit not respond to !regles?
Check that the saved prefix is indeed ! and that the command regles exists. If it is restricted to roles, the message's author must have one of them. Ammit must also be able to write in the channel.
Why are my command's title and colour not displayed?
The title and colour only apply to a boxed reply. Tick Boxed reply in the command, then click Save.