ODPlugin class
We are still working the API Reference! This page might be incomplete or doesn't contain all details!
Overview
This is an Open Ticket plugin.
It represents a single plugin in the ./plugins/ directory.
All plugins are accessible via the opendiscord.plugins global.
Don't re-execute plugins which are already enabled! It might break the bot or plugin.
Methods
Properties
crashed boolean ➜ boolean
Did this plugin crash? (A reason is available in the crashReason)
crashReason type ➜ null|"incompatible.plugin"|"missing.plugin"|"missing.dependency"|"executed"
The reason which caused this plugin to crash.
data interface ➜ api.ODPluginData
All plugin data found in the plugin.json file.
details interface ➜ api.ODPluginDetails
The additional details of this plugin.
dir string ➜ string
The name of the directory of this plugin. (same as id)
enabled boolean ➜ boolean
Is this plugin enabled?
executed boolean ➜ boolean
Did this plugin execute successfully?.
inherited id class ➜ api.ODId
The id of this data.
name string ➜ string
The name of this plugin.
priority number ➜ number
The priority of this plugin.
version class ➜ api.ODVersion
The version of this plugin.
Methods
constructor() function ➜ api.ODPlugin
(no description)
View Parameters (2)
dir: string ➜string- Parameter Description Lorem Ipsum.jsondata: interface ➜api.ODPluginData- Parameter Description Lorem Ipsum.
inherited protected _change() function ➜ void
Trigger an onChange() event in the parent ODManager of this class.
inherited changed() function ➜ void
(❌ SYSTEM ONLY!!) Set the callback executed when a value inside this class changes.
dependenciesInstalled() function ➜ string[]
Get a list of all missing npm dependencies that are required for this plugin.
execute() function ➜ Promise
Execute this plugin. Returns false on crash.
View Parameters (2)
debug: class ➜api.ODDebugger- Parameter Description Lorem Ipsum.force: boolean ➜boolean- Parameter Description Lorem Ipsum.
getStartFile() function ➜ string
Get the startfile location relative to the ./plugins/ directory. (./dist/plugins/) when compiled)
pluginsIncompatible() function ➜ string[]
Get a list of all enabled incompatible plugins that interfere with this plugin.
View Parameters (1)
manager: class ➜api.ODPluginManager- Parameter Description Lorem Ipsum.
pluginsInstalled() function ➜ string[]
Get a list of all missing plugins that are required for this plugin.
View Parameters (1)
manager: class ➜api.ODPluginManager- Parameter Description Lorem Ipsum.
Defaults
We're still working on this part of the documentation!
Examples
We're still working on this part of the documentation!