Skip to main content
Version: v2.10.0

Plugin

Table of Contents

Class Definition

export abstract class Plugin {}

Properties

Property Type Description
namestringThe name of the plugin.

Constructor

new Plugin(name: string)
Parameter Type Description Optional
namestringThe name of the plugin.

Methods

load()

load(manager: Manager): void

Load the plugin.

Parameter Type Description
managerManagerManager class

unload()

unload(manager: Manager): void

Unload the plugin.

Parameter Type Description
managerManagerManager class

Example usage

const { Manager } = require("magmastream");
const MyPlugin = require("my-magmastream-plugin");

const manager = new Manager({
...ManagerOptions,
plugins: [new MyPlugin()],
});