Command syntax

From IdleRPG Wiki
Revision as of 23:06, 17 February 2020 by Adrian (talk | contribs) (→‎Commands without any arguments)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

"Command syntax" describes the different arguments that the bot uses and in which way a user has to enter them in chat. The basic command syntax is prefix command arguments. A command's syntax can be seen with $help <command>

Prefix

A command's prefix is the symbol, letter or phrase entered with any command. If a command does not include the prefix, the bot will never recognize the command. By default, the bot's command prefix is $. It can be changed with the command $settings prefix <prefix>, replacing <prefix> with the new character you want to use in your server. Changing the bot's prefix for a server requires the Manage Server permission. An alternative prefix that always works is mentioning the bot: @IdleRPG#8939 settings prefix $ resets the prefix to the default.

Commands without any arguments

Some commands, for example $delete, do not have any arguments and can be entered as is.

Required arguments

Required arguments are denoted in chevrons. An example of a command with required arguments is $give <money> <other>. Both <money> and <other> are required arguments.
If a command is entered without including a required argument, the bot will send an error revealing the first required argument which is missing.

Optional arguments

Optional arguments are denoted in brackets. Optional arguments can be included in commands, but it is not necessary.

Predetermined arguments

An example of a command with optional predetermined arguments is $flip [side=heads] [amount=0]. If the arguments are not entered, the predetermined value is used (in this case, side is heads and amount is 0 by default)

Empty arguments

An example of a command with optional empty arguments is $doubleorsteal [user]. The argument can be entered to specify a user, and if the argument is not entered, any user will be able to join in this Double-or-Steal round.

Multiple-in-one arguments

multiple-in-one arguments are lists of values, denoted in brackets and ending with .... An example of a command with a multiple-in-one argument is $exchange [loot_ids...].
Arguments will be entered with a space in between the individual values, for example $exchange 10937 10938 10939.