Skip to content
Axaro

Custom commands

Live

Your own commands, and automatic replies to keywords.

Write a command

One line is a trigger and a text. !ip gives your game server’s address, !rules reminds the rules. The prefix is chosen once for the whole server; ! by default.

SettingEffect
triggerWhat people type, without the prefix
aliasesOther spellings of the same trigger
responseThe reply text
replyIn the channel, as a reply to the message, or in private
channelIdsChannels concerned. Empty: everywhere
allowedRoleIdsAllowed roles. Empty: everyone
cooldownSecondsDelay between two uses, per person

/tags lists what exists. It only shows what the person can actually run where they are: a line reserved for staff or another channel is not listed, otherwise discovering it would end in a refusal.

Automatic replies

A line can also trigger without a prefix, on the message itself. Three ways: the whole message, its start, or a word it contains.

TriggerExample
COMMANDThe prefix then the name: !ip
EXACTThe message is exactly “thanks”
STARTS_WITHThe message starts with “help”
CONTAINSThe message contains the word “recruiting”
CONTAINS looks for the whole word, never a piece of it. A line ass does not answer “class”. That is the difference between an automatic reply and a bot that talks without anyone understanding why.

Variables

The reply text accepts a few variables, replaced at send time. {args} carries what follows the command name: !say hello gives “hello”.

VariableReplaced with
{user}The person’s mention
{username}Their name alone
{server}The server name
{channel}The current channel
{memberCount}The member count
{args}What follows the command name
There are no loops, no conditions, no outside calls: it is a text replacement, nothing more. A template that can loop is a way to block the bot, and a template that can call an address is a way to make it say whatever you want.
An @everyone written in a reply is displayed but notifies nobody. Only the mention of the person who just wrote is live.
Discord custom commands and auto-replies · Axaro