Skip to main content
Righteous

Command aliases

Give a command a second, server-specific name with arguments baked in, and understand what that name can and cannot reach.

An alias is a second name your server gives to a command it already has. ,yeet @someone can run ,timeout @someone 1d, and ,deport @someone can run ,ban @someone raiding. Same command, same gates, a word your staff will actually remember. Where prefix and slash commands is about what the whole server answers to, this is about naming one command inside it.

Aliases are a Server Premium feature, and every subcommand additionally needs Manage Server: granted by Discord, or through fake permissions.

A lapsed subscription stops aliases without deleting them

The tier is re-checked on every single invocation, never trusted from the moment the alias was written. If Server Premium lapses, aliases stop being recognised immediately. The words fall through as ordinary text, with no error. The rows are kept, so every alias works again the moment the server is premium again, with nothing to re-enter, the same treatment every expensive setting gets when a tier lapses.

Create an alias

,alias add takes the new name, then the command it should run, then anything you want baked in.

Syntax

,alias add <name> <command> [args...]

Example

,alias add yeet timeout {0} 1d
PartMeansAccepts
<name>the word your server will answer to1 to 32 characters of letters, numbers, - or _, no spaces; stored lowercase
<command>what it runsany top-level command, or one of that command's built-in aliases
[args...]a subcommand, preset arguments, placeholdersup to 200 characters of everything after the command name

The name is lowercased on the way in, so YEET and yeet are the same alias.

An alias can point at a plain command (,alias add sweep clear), at a subcommand (,alias add cleanbots clear bots, which runs ,clear bots), or at either with arguments already filled in. Reach for the obvious word and you may find the bot already owns it: ,alias add purge clear is refused, because purge is one of clear's own built-in aliases and already does that. A subcommand target is stored under its parent, so the subcommand's own gates still run exactly as if it had been typed out. On success the bot tells you what the alias now runs and how many arguments it will demand.

Pass the caller's own words through

{0} is the first word the caller types, {1} the second, and so on up to {9}, ten placeholders, which is where an alias stops being a name and starts being a script.

Syntax

,alias add <name> <command> {0} [more args...]

Example

,alias add shh timeout {0} 10m
RuleMeans
Indices run from {0} with no gaps{0} {2} is refused: a gap forces the caller to type a word that goes nowhere
Highest index plus one is what the caller must supply,shh above needs one argument; ,alias view prints the number
Anything typed beyond the placeholders is appended,shh @someone being rude runs ,timeout @someone 10m being rude
{{ and }} are escapesThey come out as a literal { and }

Substitution happens in one pass, and that is a security property rather than a nicety: a caller's own argument that looks like a placeholder stays literal. Someone typing ,shh {0} passes the text {0} through; it is never read a second time and can never be made to expand into something else.

Build a set of severity tiers on one command

Placeholders make one command into several named decisions. shh for timeout {0} 10m and yeet for timeout {0} 1d are the same command with the judgement already made, so nobody has to remember which duration this server uses.

Change or delete one

,alias edit repoints an existing alias at a different command or different preset arguments. It takes exactly the shape add does.

Syntax

,alias edit <name> <command> [args...]

Example

,alias edit yeet timeout {0} 7d

edit cannot rename. Renaming is remove and add: two steps, deliberately, so the name rules and the target rules stay in one place. edit does skip the per-server limit, so a server sitting at the cap can still repair an alias that has stopped working.

,alias remove deletes one, and only ever touches this server's aliases.

Syntax

,alias remove <name>

Example

,alias remove yeet

,alias clear deletes every alias in the server. It needs a confirmation word typed after it, and three of them count: confirm, yes, and the bare letter y. All three delete every row just as thoroughly, so treat a stray y on that line as the whole wipe. Run it without one and it tells you how many rows are at stake instead of deleting them. There is no undo.

Syntax

,alias clear confirm

On slash, clear asks for a confirmation checkbox rather than the word, and edit, remove and view autocomplete the name from the aliases the server actually has.

See what the server already has

,alias list pages through every alias, grouped by the command they run rather than sorted by name, so a set of tiers on one command reads as a set instead of scattering. The footer carries the count against the per-server limit and says how many rows need attention.

Syntax

,alias list

,alias view shows one alias in full: what it runs, how many arguments it takes, a worked example built by the real expander, who created it and when.

Syntax

,alias view <name>

Example

,alias view shh

,alias search matches the alias name and what it runs, so "find everything that bans" works as well as "find the one I called deport".

Syntax

,alias search <query>

Example

,alias search timeout

A server holds at most 50 aliases. add refuses past that and names the limit.

Understand what an alias cannot point at

Four names are refused at creation, and each refusal buys something.

Refused nameWhy it is refused
One that is already a real commandA real command always wins at resolve time, so the alias would never fire
One that is already a built-in alias of the bot'sThe same reason: the built-in wins, and the message names what it collided with
One this server already uses for an aliasTwo rows with one name means one of them can never run
A subcommand name of alias itselfadd, list, clear and their siblings are reserved

The first two are the interesting ones. A colliding alias is not dangerous. It is dead. It would save green, sit in ,alias list, and never once run, which is worse than a refusal because nobody would know. So it is refused at write time, while somebody is there to read the message.

Targets are refused too. An alias cannot point at a developer-only command, at one the developer has disabled, or at alias itself, that last one being the only shape that could produce an alias which creates aliases, so it is closed structurally rather than watched for.

Know that an alias is a second name, never a second door

Worried that an alias hands somebody a shortcut around your gates? It cannot. Every gate in the bot keys on the real command's name, never on the word that was typed, and an alias is turned back into the real command before a single gate runs.

So an alias inherits, with nothing to configure and nothing to forget:

  • the command's required permissions, fake permissions included
  • its cooldown
  • any role restriction on it
  • any channel disable on it
  • the developer's own disable, and the blacklist

The consequence in the direction people usually want it: ,command disable and ,restrict already cover every alias of that command, automatically, the moment you write the rule. You never gate an alias. You gate the command, once.

Watch for an alias a release has reclaimed

Righteous ships new commands. If a future release adds a real command with the same name as one of your aliases, the real command wins from that moment on, and the alias is not deleted. It is marked shadowed. ,alias list shows the marker alone (a warning next to the row, and a footer counting how many rows need attention), while ,alias view is where the reason is spelled out. So list tells you something is wrong and view tells you what. Rename it and it works again.

Two other markers appear the same way: missing target, for an alias whose command no longer exists, and unavailable, for one whose command has since become developer-only. Nothing is ever thrown away on your behalf: a marked row is a decision waiting for you, not a cleanup already done.

Common issues

The bot says "This alias needs 1 more argument". The alias has a {0} you did not fill in. The message prints the shape it wants: ,shh <arg1>. It is refused rather than run with a blank, because a moderation command handed an empty target can resolve to the person who typed it.

Nothing happens when I type my alias, no error at all. Silence means the word was not recognised as an alias. Check Server Premium is still active, then check the alias exists with ,alias list. An alias whose target command no longer exists also fails silently, which is why list marks it.

,alias add says the name is already a command. Pick another word. A colliding alias would never fire, so it is refused rather than saved; the message names exactly what it collided with.

An alias stopped working after a bot update. A release reclaimed the name. Run ,alias view, read the shadowed marker, rename it.

Members can run an alias they cannot run the real command with. They cannot. If it looks that way, the permission is real and coming from elsewhere. Check fake permissions, and whether they hold Administrator, which bypasses channel disables and role restrictions.

I want to rename one and edit will not do it. edit repoints; it does not rename. Remove the alias and add it under the new name.

Nothing here fixed it. The shared common issues page works the same ground from the symptom end.