-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins.js Documentation
Plugins.js allows you to interact with leo and Meower from your plugin easier through simple functions.
Functions related to plugins. All changes require a reload to take effect.
Disables the specified plugin. Returns an error if specified plugin is not enabled or does not exist.
Accepts pluginName (string, required) and reload (boolean) parameters
Example usage
plugins.disable("plugin name", true)
- Disables plugin and reloads
plugins.disable("plugin name", false)
- Disables plugin but does not reload
Enables the specified plugin. Any name can be specified but only valid plugin names will load upon reload. This will likely change in the future.
Accepts pluginName (string, required) and reload (boolean) parameters
Example usage
plugins.enable("plugin name", true)
- Enables plugin and reloads
plugins.enable("plugin name", false)
- Enables plugin but does not reload
Returns a test message to confirm Plugins.js is loaded and working.
Example usage
plugins.test()
Returns the client Plugins.js is loaded on
Example usage
plugins.client()
Functions related to changing settings on leo. Dangerous account actions (deleting account, changing password, clearing tokens etc) cannot be made through Plugins.js for security reasons. List of settings can be found here.
Disables the specified setting. Returns an error if specified setting does not exist.
Accepts settingName (string, required) parameter
Example usage
settings.disable("setting name")
- Disables specified setting
Enables the specified setting. Returns an error if specified setting does not exist.
Accepts settingName (string, required) parameter
Example usage
settings.enable("setting name")
- Enables specified setting