The prefix is what tells the bot that your message is a command and not just any message. By default, the prefix is
! but as that is a common bot prefix, it has been made so you can set your own prefix per guild. Additionally, you will always be able to trigger the bot using a mention prefix:
Usage is a template for how a command can be used. It is made up of Aliases and Arguments.
An alias is exactly what it sounds like. It is multiple commands that produce the same result. Aliases are shown in the usage string wrapped in
( ) and seperated by
|, like this:
(github|version|about). This means in a guild where the prefix is
! that command can be triggered as
Arguments are the additional pieces of information you provide, to get the information you are looking for. Arguments are seperated into 2 categories, required and optional. Required arguments are wrapped in
< >. Optional arguments are wrapped in
[ ]. Arguments follow the following format
Note: Min & Max may be omited seperately, or completely when the argument has no min or max.
- Points is a required argument: it is expecting an integer type with a minimum value of 1 and maximum of 50.
- Level is an optional argument: it is expecting an integer type with a minimum value of 1 and maximum of 120.
Arguments expect certain types of data, and are validated before the command is even run. For instance, if you provide a String (letters) where the bot is expecting a Number, that can be a problem if it isn't caught. Although, some arguments may accept multiple types like:
<ItemID:int|ItemName:str>. That single argument can be an ItemID as an integer or an ItemName as a string.
The following types have been implimented in RuneInfo's framework:
- Literal: Litterally matches the argument name. This is the default type, if none is shown.
- Str, String: Letters and or Letters and numbers mixed. Min/Max refer to the Character Length.
- Int, Integer: Positive or Negative Whole Numbers. Min/Max refer to the Value.
- Num, Number, Float: Any rational number, written as a decimal. Min/Max refer to the Value.
- URL: A link
- Guild: A Discord Guild ID.
- Role: A Discord Role ID
- Member: A Mention or Discord User ID in the context of a guild.
- User: A Mention or Discord User ID that the bot can see in any guild.
- Msg, Message: A Discord Message ID.
- RSN: A RuneScape Username, if none is provided it will use the RSN you have set previously with the
- OSRSN: An OldSchool RuneScape Username, if none is provided it will use the OSRSN you have set previously