PluginController

Vocality DocumentationGlobalsPluginController

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:

NameTypeDescription
guildIdstring-
pluginPlugininstance 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:

NameType
guildIdstring

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:

NameType
guildIdstring

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:

NameTypeDescription
guildIdstringIn which guild the plugin should be loaded
pluginPluginThe 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:

NameTypeDescription
guildIdstringThe guild to unload the plugin for
pluginPluginThe plugin to unload

Returns: void


unloadAll

unloadAll(guildId: string): void

Defined in packages/vocality-core/src/controllers/PluginController.ts:101

Unloads all plugins

Parameters:

NameTypeDescription
guildIdstringThe guild to unload all plugins for

Returns: void