PluginController
Vocality Documentation › Globals › PluginController
Hierarchy
- PluginController
Index
Constructors
Properties
Methods
Constructors
constructor
+ new PluginController(): PluginController
Defined in packages/vocality-core/src/controllers/PluginController.ts:8
Returns: PluginController
Properties
plugins
• plugins: Collection‹string, Plugin[]›
Defined in packages/vocality-core/src/controllers/PluginController.ts:8
Contains all enabled and disabled plugins
Methods
addPlugin
▸ addPlugin(guildId
: string, plugin
: Plugin): void
Defined in packages/vocality-core/src/controllers/PluginController.ts:43
Add a plugin to a given guild and loads it.
Parameters:
Name | Type | Description |
---|---|---|
guildId | string | - |
plugin | Plugin | instance of a plugin |
Returns: void
getGuildPlugins
▸ getGuildPlugins(guildId
: string): Plugin[]
Defined in packages/vocality-core/src/controllers/PluginController.ts:26
Return all plugins of the current guild
Parameters:
Name | Type |
---|---|
guildId | string |
Returns: Plugin[]
getLoadedPluginsInGuild
▸ getLoadedPluginsInGuild(guildId
: string): Plugin[]
Defined in packages/vocality-core/src/controllers/PluginController.ts:17
Return all enabled plugins for a given guild
Parameters:
Name | Type |
---|---|
guildId | string |
Returns: Plugin[]
load
▸ load(guildId
: string, plugin
: Plugin): void
Defined in packages/vocality-core/src/controllers/PluginController.ts:60
Loads a plugin that was enabled and unloaded
Parameters:
Name | Type | Description |
---|---|---|
guildId | string | In which guild the plugin should be loaded |
plugin | Plugin | The plugin that should be loaded |
Returns: void
unload
▸ unload(guildId
: string, plugin
: Plugin): void
Defined in packages/vocality-core/src/controllers/PluginController.ts:82
Unloads a plugin by invoking the plugins disable method.
Parameters:
Name | Type | Description |
---|---|---|
guildId | string | The guild to unload the plugin for |
plugin | Plugin | The plugin to unload |
Returns: void
unloadAll
▸ unloadAll(guildId
: string): void
Defined in packages/vocality-core/src/controllers/PluginController.ts:101
Unloads all plugins
Parameters:
Name | Type | Description |
---|---|---|
guildId | string | The guild to unload all plugins for |
Returns: void