Skip to content

Plugin Control Commands

Innocent Bystander edited this page Aug 16, 2015 · 4 revisions

Framework 2.7 introduces commands that can be used to dynamically load and unload plugins while the bot is running.

Commands

Registered in system plugin: commands.plugincontrol

display plugin info

/bot plugininfo [<search string>]

  • Bot outputs plugin details, filtered by the optional <search string>
  • Details include: plugin module name; list of register user, admin; registered handlers; and shared objects
  • Note: The mobile Hangouts client may fail to display large lists properly. If you encounter this issue, try a partial search by providing a <search string> to narrow the results list, or use a desktop Hangouts client.

load a plugin

/bot pluginload <module path>

  • Attempts to load the specified plugin from <module path> into the bot and initialise it
  • <module path> must be the full path to the module relative to the bot - it should be prefixed plugins. e.g. plugins.mentions, plugins.dnd, etc
    • You can do a partial search of all plugins and their module paths with /bot plugininfo

reload a plugin

/bot pluginreload <module path>

  • Attempts to unload, then reload the specified plugin at <module path>
  • <module path> must be the full path to the module relative to the bot - it should be prefixed plugins. e.g. plugins.mentions, plugins.dnd, etc
    • You can do a partial search of all plugins and their module paths with /bot plugininfo
  • This command will refuse to unload a plugin that has running threads that were started via the threadmanager library - this is due to a platform limitation: threads cannot be safely terminated externally.

unload a plugin

/bot pluginunload <module path>

  • Attempts to unload the specified plugin identified by <module path>
    • Unloading a plugin will de-register all commands, handlers, shared objects and running asyncio tasks
  • <module path> must be the full path to the module relative to the bot - it should be prefixed plugins. e.g. plugins.mentions, plugins.dnd, etc
    • You can do a partial search of all plugins and their module paths with /bot plugininfo
  • This command will refuse to unload a plugin that has running threads that were started via the threadmanager library - this is due to a platform limitation: threads cannot be safely terminated externally.

# ## ###

Clone this wiki locally