Class: BdApi
BdApi is a globally (window.BdApi) accessible object for use by plugins and developers to make their lives easier. It can be instantiated (new BdApi("MyPlugin")) to get a version of the API with automatic scoping for plugins, or its static properties can be used directly.
Constructors
Constructor
new BdApi(
pluginName):BdApi
Parameters
| Parameter | Type |
|---|---|
pluginName | string |
Returns
BdApi
Properties
Commands
staticCommands:CommandAPI
An instance of CommandAPI for adding slash commands
Components
staticComponents:Components
A set of react components plugins can make use of
ContextMenu
staticContextMenu:ContextMenu
An instance of ContextMenu for interacting with context menus
Data
staticData:Data
An instance of Data to manage data
DOM
staticDOM:DOM
An instance of DOM to interact with the DOM
Hooks
staticHooks:Hooks
An instance of Hooks for react hooks
Logger
staticLogger:Logger
An instance of Logger for logging information
Net
staticNet:Net
An instance of Net for using network related tools
Patcher
staticPatcher:Patcher
An instance of Patcher to monkey patch functions
Plugins
staticPlugins:AddonAPI
An instance of AddonAPI to access plugins
React
staticReact: typeofReact
The React module being used inside Discord
ReactDOM
staticReactDOM: typeofReactDOMBase& typeofReactDOMClient
The ReactDOM module being used inside Discord
ReactUtils
staticReactUtils:ReactUtils
An instance of ReactUtils to work with React
Themes
staticThemes:AddonAPI
An instance of AddonAPI to access themes
UI
staticUI:UI
An instance of UI to create interfaces
Utils
staticUtils:Utils
An instance of Utils for general utility functions
version
staticversion:string
A reference string for BD's version
Webpack
staticWebpack:Webpack
An instance of Webpack to search for modules
Accessors
Commands
Get Signature
get Commands():
BoundCommandAPI
An instance of CommandAPI for adding slash commands
Returns
Components
Get Signature
get Components():
Components
A set of react components plugins can make use of
Returns
ContextMenu
Get Signature
get ContextMenu():
ContextMenu
An instance of ContextMenu for interacting with context menus
Returns
Data
Get Signature
get Data():
BoundData
An instance of Data to manage data
Returns
DOM
Get Signature
get DOM():
BoundDOM
An instance of DOM to interact with the DOM
Returns
Hooks
Get Signature
get Hooks():
BoundHooks
An instance of Hooks for react hooks
Returns
Logger
Get Signature
get Logger():
BoundLogger
An instance of Logger for logging information
Returns
Net
Get Signature
get Net():
Net
An instance of Net for using network related tools
Returns
Patcher
Get Signature
get Patcher():
BoundPatcher
An instance of Patcher to monkey patch functions
Returns
Plugins
Get Signature
get Plugins():
AddonAPI
An instance of AddonAPI to access plugins
Returns
React
Get Signature
get React(): typeof
React
The React module being used inside Discord
Returns
typeof React
ReactDOM
Get Signature
get ReactDOM(): typeof
ReactDOMBase& typeofReactDOMClient
The ReactDOM module being used inside Discord
Returns
typeof ReactDOMBase & typeof ReactDOMClient
ReactUtils
Get Signature
get ReactUtils():
ReactUtils
An instance of ReactUtils to work with React
Returns
Themes
Get Signature
get Themes():
AddonAPI
An instance of AddonAPI to access themes
Returns
UI
Get Signature
get UI():
UI
An instance of UI to create interfaces
Returns
Utils
Get Signature
get Utils():
Utils
An instance of Utils for general utility functions
Returns
version
Get Signature
get version():
string
A reference string for BD's version
Returns
string
Webpack
Get Signature
get Webpack():
Webpack
An instance of Webpack to search for modules