Updated Creating Plugins (markdown)
parent
e77ac047b4
commit
9481df3221
|
@ -4,7 +4,7 @@
|
|||
2. The file must be named as `pluginname.plugin.js`, the plugin name can be whatever you want.
|
||||
3. Plugin files require a special header ([[see this page for details|Plugin-and-Theme-METAs]])
|
||||
4. The name defined in the header must match the variable/classname
|
||||
5. Plugins must implement the [following functions](#required-functions): `getName`, `getDescription`, `getVersion`, `getAuthor`, `start` and `stop`.
|
||||
5. Plugins must implement the [following functions](#required-functions): `getName`*, `getDescription`*, `getVersion`*, `getAuthor`*, `start` and `stop`. (*These functions are not needed if you add them to the META described in point 3)
|
||||
Optionally, you may implement `getSettingsPanel`, `load`, `observer`, and `onSwitch`. More details on each function below.
|
||||
6. Plugins can make use of the [`BdApi`](#bdapi) object described [below](#bdapi).
|
||||
7. Plugins can make use of any node modules or Discord modules (through webpack).
|
||||
|
@ -25,6 +25,8 @@ BandagedBD requires information at the beginning of a plugin file to identify it
|
|||
#### `getName()`
|
||||
The name for the plugin to be displayed to the user in the plugins page and for internal settings to use.
|
||||
|
||||
Note: This is no longer required if it is included in the meta.
|
||||
|
||||
**@Returns** `{string}` - the name for the plugin.
|
||||
|
||||
***
|
||||
|
@ -32,6 +34,8 @@ The name for the plugin to be displayed to the user in the plugins page and for
|
|||
#### `getDescription()`
|
||||
The description of the plugin shown in the plugins page.
|
||||
|
||||
Note: This is no longer required if it is included in the meta.
|
||||
|
||||
**@Returns** `{string}` - the description of the plugin.
|
||||
|
||||
***
|
||||
|
@ -39,6 +43,8 @@ The description of the plugin shown in the plugins page.
|
|||
#### `getVersion()`
|
||||
The version of the plugin displayed in the plugins page.
|
||||
|
||||
Note: This is no longer required if it is included in the meta.
|
||||
|
||||
**@Returns** `{string}` - the version of the plugin.
|
||||
|
||||
***
|
||||
|
@ -46,6 +52,8 @@ The version of the plugin displayed in the plugins page.
|
|||
#### `getAuthor()`
|
||||
The author string for the plugin displayed in the plugins page.
|
||||
|
||||
Note: This is no longer required if it is included in the meta.
|
||||
|
||||
**@Returns** `{string}` - the author of the plugin.
|
||||
|
||||
***
|
||||
|
@ -96,6 +104,8 @@ Called every time the user navigates such as changing channel, changing servers,
|
|||
|
||||
# BdApi
|
||||
|
||||
`BdApi` is a globally available access usable in plugins by any of the following ways: `BdApi`, `window.BdApi`, `global.BdApi`.
|
||||
|
||||
The following functions are available as a part of the `BdApi` object.
|
||||
|
||||
## Properties
|
||||
|
|
Loading…
Reference in New Issue