diff --git a/examples/PluginAuthoring.md b/examples/PluginAuthoring.md index 90087be2..78e655e5 100644 --- a/examples/PluginAuthoring.md +++ b/examples/PluginAuthoring.md @@ -59,7 +59,7 @@ class CustomPlugin extends Plugin this.client = client; } - async init() + init() { console.log('Custom plugin initialized.'); } @@ -75,8 +75,8 @@ instance: The Plugin `init()` method will be called when the plugin is loaded, which is after all storages (including guild storages) are available but before `clientReady` is emitted. Assuming you store the client instance passed in the Plugin constructor -like in the example above, you will be able to use it here. This method is expected -to be async. +like in the example above, you will be able to use it here. This method can be async +if needed to make things easier for yourself. ## Plugin tools diff --git a/src/client/Plugin.ts b/src/client/Plugin.ts index 3c125c4b..08adfbbb 100644 --- a/src/client/Plugin.ts +++ b/src/client/Plugin.ts @@ -22,7 +22,7 @@ import { IPlugin } from './interface/IPlugin'; * is called * *
**Note:** A plugin is expected to have two things at runtime: - * a `name` property containing the name of the plugin, and an async `init()` + * a `name` property containing the name of the plugin, and an `init()` * method that will be called by the framework after loading the plugin.* @@ -42,5 +42,5 @@ import { IPlugin } from './interface/IPlugin'; export class Plugin implements IPlugin { public name: string; - public async init(): Promise
* See: {@link IPlugin#name} and {@link IPlugin#init}