Skip to content

plugin_reload

Reload plugins from disk so edits take effect without a server restart. Use it after editing main.js, running git pull in a plugin folder, or adding or removing plugin folders by hand.

{
"cmd": "plugin_reload",
"name": "hello"
}
Field Type Required Description
name string No Plugin to reload. Leave it out to reload every plugin.
{
"cmd": "plugin_reload",
"val": true
}

The reload is recorded in the audit log.

  • The server reads plugin.json and main.js again and checks them. If a check fails, you get the error and the previous version keeps running.
  • If it passes, the old version is unloaded and the new one loaded. Every authenticated connection receives slash_remove for the old slash commands, then slash_add for the new ones.
  • If the manifest says enabled: false, the plugin is unloaded and the response is still val: true.
  • If the plugin’s folder or manifest is gone, the plugin is unloaded and you get Plugin '<name>' is not installed.

Every loaded plugin is unloaded, then every folder in the database directory’s plugins/ folder is loaded again. This picks up new and deleted folders. A plugin that fails to load is skipped and logged on the server; the response is still val: true.

Requires manage_server. It is blocked while you are timed out.

These apply only when name is set.

val When
Invalid plugin name name has characters other than letters, digits, _, and -.
Plugin '<name>' is not installed There is no readable plugin.json for that name. Any loaded copy was unloaded.
Plugin '<name>' has no readable manifest plugin.json disappeared or became unreadable during the reload.
Manifest or source error The files failed their checks. The messages are listed on plugin_install, plus Manifest name must match the plugin directory when plugin.json has a different name.
Validation message name is blank or longer than 64 characters.