-
Notifications
You must be signed in to change notification settings - Fork 3
Configuring Plugins
The bot is fully modular and uses configurable plugins in order to provide the user with full control over the bot's features.
Each plugin includes 1 or more settings that the user can enable/disable and configure in order to get the bot working to their liking.
Plugins can have their own ID checks, OP level, and their own configuration fields.
Applies to: Discord Commands
Each plugin can be provided with multiple role/member IDs to check before executing a discord command. A member in a guild will only be able to execute the command if they pass the ID checks, i.e they are one of the members whose ID is provided or they have one of the roles whose ID is provided. ID checks set on the plugin level apply to every setting (discord commands) in the plugin, unless the setting provides its own ID checks, in which case those will be used instead.
Applies to: Server Commands
Each plugin can be given a default OP level requirement for each of its settings. A player in-game will only be able to execute the commands if they meet the required OP level. Similar to ID checks, the OP level set on the plugin is applied to all settings in the plugin unless the setting provides its own OP level, in which case that will be used instead.
Let's look at an example of ID checks and OP Level work:
"plugin": {
"id_checks": [439793301554462721],
"op_level": 2,
"settings": {
"setting_a": {
"id_checks": []
},
"setting_b": {
"id_checks": [762137196018008086]
},
"setting_c": {
"op_level": 0
},
"setting_d": {
"op_level": 1
}
}
}
Here, we see that the plugin defines a global ID check, setting_a
does not define any ID checks and setting_b
defines a different ID check. Therefore, the global ID check will apply to setting_a
whilst setting_b
will use its own ID check and disregard the one provided by the plugin. Similarly, setting_c
, as it has not defined its own OP level, will default to using the one provided by the plugin, and setting_d
will use its own value of 1
instead of the value of 2
provided by the plugin.
A plugin can also have a global config that all of its settings can access. In addition, each setting can provide its own config that will be local to that setting.
Now that you understand the different types of configuration fields that a plugin and its settings can have, let's take a look at how to actually configure them.
The first way to configure the settings is by manually editing the settings.json
file. Simply head over to config/settings.json
and enable/disable and fill in all the required configuration values as well as add in your desired ID checks and OP level for each command.
Note: The bot must be restarted in order for these changes to take effect
The second way to configure the settings is via the built-in settings
and plugins
command on discord. Use plugins
to configure values on the plugin level, and use settings
to configure each setting individually. Running the command will provide you with an easy to use UI that you can scroll through and enable/disable as well as configure any plugins and settings to your heart's content.