Commands
blargbot is equipped with a vast number of built-in commands for various purposes. To use a command, you must first use a command prefix in your message.
Prefixes
By default, blargbot responds to the prefixes b!
, blargbot
, and mentions.
You can add custom prefixes both per-guild and personally - check out the prefix
and pprefix
commands!
Permissions
In general, commands are split into normal and admin commands. Normal commands can be executed by anyone, but admin commands have specific permission requirements.
By default, the only people who are able to use admin commands are the server owner and
anyone with the administrator permission. This can be configured in terms of both permissions
and roles, using the settings
command.
An 'admin role' can be set (b!settings set ADMINROLE <role name>
).
Anyone with this role will be able to use admin commands, regardless of what permissions they have.
There's also a 'permission overwrite' system (b!setting set PERMOVERRIDE true
).
The default staff permission configuration allows anyone with any of the following permissions is considered to be an admin:
- Administrator
- Manage Channels
- Manage Server
- Kick Members
- Ban Members
- Manage Messages
Additionally, the permission and/or role requirements can be set per-command using the editcommand
command.
Finally, some commands have special permission requirements. For example, to use the ban
command,
you not only need to be considered an admin, but also need the Ban Members permission. This is to prevent abuse,
and can be controlled using the KICKOVERRIDE
and BANOVERRIDE
settings.
Flags
blargbot offers a robust flag system for using commands. This is useful for when you need to provide a lot of information to a command, where positional arguments would get confusing.
Flags are unix-like. There's two ways to provide flags: long (ex. --flag
) and short (ex. -f
).
Sometimes the existence of a flag is enough for a command, but other times you'll need to provide a value (ex. --flag content
).
Short flags can also be chained. For example, -flag
would be equivalent to
writing -f -l -a -g
. You can't provide content to chained flags, except for the last one provided.
If you ever want to provide positional arguments after providing flags, just use an empty --
.
Reading Usage Docs
When reading about how a command is used, keep in mind the following:
<arg>
- The argument is required[arg]
- The argument is optional...arg
- The argument is provided multiple times