Custom commands
LiveYour 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.
| Setting | Effect |
|---|---|
trigger | What people type, without the prefix |
aliases | Other spellings of the same trigger |
response | The reply text |
reply | In the channel, as a reply to the message, or in private |
channelIds | Channels concerned. Empty: everywhere |
allowedRoleIds | Allowed roles. Empty: everyone |
cooldownSeconds | Delay 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.
| Trigger | Example |
|---|---|
COMMAND | The prefix then the name: !ip |
EXACT | The message is exactly “thanks” |
STARTS_WITH | The message starts with “help” |
CONTAINS | The 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”.
| Variable | Replaced 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.