dcord.bot.plugin

Base class for creating plugins the Bot can load/unload.

Members

Classes

Plugin
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.

PluginOptions
class PluginOptions

PluginOptions is a class that can be used to configure the base functionality and utilties in use by a plugin.

PluginState
class PluginState

PluginState is a class that encapsulates all run-time states required for a plugin to exist. It's purpose is to allow for hot-reloading and replacing of plugin code, without having to destroy or rebuild run-time data.

Functions

Synced
SyncedAttribute Synced()

UDA which tells StateSyncable that a member attribute should be synced into the state on plugin load/unload.

Mixin templates

StateSyncable
mixintemplate StateSyncable()

The StateSyncable template is an implementation which handles the syncing of member attributes into are PluginState.custom store during plugin load/unload. This allows plugin developers to simply attach the @Synced UDA to any attributes they wish to be stored, and then call stateLoad and stateUnload in the plugin load/unload functions.

Structs

SyncedAttribute
struct SyncedAttribute

Sentinel for @Synced attributes TODO: this is messy. Better way to achieve a sentinel?

Meta