Commands are actions called by sending a message starting with a prefix.
A message calling a command can be divided into two parts:
prefix
_
/ \
el!info user 368475654662127616
\__________________________/
command part
A short character string which starts the command call.
The default prefix is el!
.
The command part can be further divided into two parts:
arguments
________________
/ \
info user 368475654662127616
\_______/
command path
It’s split into words by spaces. Words are the unit used both in the command path and arguments later.
You can alter how a command is split to some degree by using special character sequences:
""
or ''
will not split on spaces.\
(backslash) followed by:
\
, "
, '
or space will make the character literal and not a part of special sequence.n
will insert a new line.One or more words describing which command will be called.
The simplest command path is a root command name.
Root commands are commands that exist on their own. So if there is a root command foo
, you can call it like that:
foo
But commands can group (contain) other commands. Here, root command foo
groups bar
and baz
, and baz
groups test
:
foo
/ \
bar baz
|
test
You can also show it like this:
Grouped commands are called by first specifying their grouping command, and then themselves.
With the previous example, if you want to call bar
, you first specify foo
, and then bar
:
foo bar
If you want to call test
, you first specify foo
, then baz
and finally test
:
foo baz test
Additional options that the command can take. A command can take zero or more arguments.
Arguments:
Have values
Values are what’s passed to the command.
Possible value types:
String
Any text. It’s passed as is.
None
No value, only allows to count argument occurences.
An argument has a value if the value is not None
.
Are positional, short or long
Positional arguments are specified as their values in order.
Example:
11 42 69
Will pass three first positional arguments with values 11
, 42
and 69
.
Short arguments are specified in any order. They start with a -
and are a single character.
Example:
-a -c
Will pass a
and c
.
If it has a value, it needs to be specified as the next word.
Example:
-a -b value
Will pass a
, and b
with value
.
Multiple short arguments can be grouped together in a single word, but only the last one can have a value.
Example:
-ac -db value
Will pass a
, c
, d
, and b
with value
.
Long arguments, similar to short arguments, are specified in any order. They start with --
and are a character string.
Example:
--long-argument
Will pass long-argument
.
If it has a value, it needs to be specified as the next word or after a =
.
Example:
--foo=bar --test value
Will pass foo
with bar
, and test
with value
.
A --
word will make all arguments after itself match as positional arguments.
Example:
--foo=bar -- --this-looks-like-a-long-argument-but-isnt
Will pass foo
with bar
, and the first positional argument with --this-looks-like-a-long-argument-but-isnt
.
Are optional or required
You can pass in optional arguments or leave them empty, but you have to pass required arguments or the command won’t run.
Can have default values
Arguments with default values will use them if they are never specified.
Can repeat or join
A repeating argument can be specified more than once.
Example:
-vvv -a val1 -a val2
Will pass v
three times and a
two times with val1
and val2
.
A joining argument, like a repeated one, can be specified more than once. It will then join all values into a single space-separated value.
Example:
this is a text
Will pass the positional joining argument with this is a text
.
Non-repeating, non-joining arguments can be specified only once.
A reference for all currently available commands in El.
The commands are presented on a bullet point list, levels of the list represent command groups.
The first line of each point is the command syntax:
command - command name
(command) - grouping-only command name
Grouping-only commands can’t be called, they can only group other commands.
[arg] - optional argument
arg - required argument
… - argument is repeating
<…> - argument is joining
command -> other command - command alias
The command is an alias to the other command.
The rest is the command description.
(info)
Commands related to getting information from Discord.
user [id]
Prints information about user with given id or, by default, the current user.
guild
Prints information about the current guild (server).
server -> info guild
ping
Sends Pong!
.
poll title option…
Creates a poll with the given title and options.
random from to
Generates a random integer in the range from-to.
choice choice…
Randomly picks one of the provided choices.
coin
Flips a coin.
say text<…>
Sends a message with text.
emotize text<…>
Formats text with regional indicators.
typing [text]…
Formats text like a typing event on Discord.
Inline polls with +poll
Sending a message starting with +poll
creates a inline poll by adding the following reactions: 👍, 🤷♀️, 👎.
A command reference for the legacy El version. This functionality will be soon™ replaced by the current version.
The prefix for legacy El is el.
.