Class Plugin
A Plugin represents a modular, extendable class that encapsulates certain
  Bot functionality into a logical slice. Plugins usually have a set of commands
  and listeners attached to them, and are built to be dynamically loaded/reloaded
  into a Bot.
Inherits from
- 
								Object(base class)
Constructors
| Name | Description | 
|---|---|
| this | Constructor for initial load. Usually called from the inherited constructor. | 
Fields
| Name | Type | Description | 
|---|---|---|
| bot | Bot | Bot instance for this plugin. Should always be set | 
| dynamicLibrary | void* | Pointer to the dynamic library, used for cleaning up on shutdown. | 
| dynamicLibraryPath | string | The path to the dynamic library this plugin was loaded from. If set, this
    signals this Pluginwas loaded from a dynamic library, and can be reloaded
    from the given path. | 
| state | PluginState | Current runtime statefor this plugin | 
Properties
| Name | Type | Description | 
|---|---|---|
| client[get] | Client | Client instance for the Bot running this plugin | 
| config[get] | Storage | Config instance for this plugin | 
| configPath[get] | string | Returns path to this plugins configfile. | 
| log[get] | std | Pluginloginstance. | 
| me[get] | User | User instance for the account this botis running under | 
| options[get] | PluginOptions | PluginOptionsfor this plugin | 
| storage[get] | Storage | Storage instance for this plugin. | 
| storageDirectoryPath[get] | string | Returns path to this plugins storagedirectory. | 
| storagePath[get] | string | Returns path to this plugins storagefile. | 
Methods
| Name | Description | 
|---|---|
| load | Used to loadthePlugin, initially loadingstateif requred. | 
| name | Returns the nameof this plugin. | 
| unload | Used to unloadthePlugin. Savesconfig/storageif required. |