Skip to content

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 ​

ParameterType
pluginNamestring

Returns ​

BdApi

Properties ​

Commands ​

static Commands: CommandAPI

An instance of CommandAPI for adding slash commands


Components ​

static Components: Components

A set of react components plugins can make use of


ContextMenu ​

static ContextMenu: ContextMenu

An instance of ContextMenu for interacting with context menus


Data ​

static Data: Data

An instance of Data to manage data


DOM ​

static DOM: DOM

An instance of DOM to interact with the DOM


Hooks ​

static Hooks: Hooks

An instance of Hooks for react hooks


Logger ​

static Logger: Logger

An instance of Logger for logging information


Net ​

static Net: Net

An instance of Net for using network related tools


Patcher ​

static Patcher: Patcher

An instance of Patcher to monkey patch functions


Plugins ​

static Plugins: AddonAPI

An instance of AddonAPI to access plugins


React ​

static React: typeof React

The React module being used inside Discord


ReactDOM ​

static ReactDOM: typeof ReactDOMBase & typeof ReactDOMClient

The ReactDOM module being used inside Discord


ReactUtils ​

static ReactUtils: ReactUtils

An instance of ReactUtils to work with React


Themes ​

static Themes: AddonAPI

An instance of AddonAPI to access themes


UI ​

static UI: UI

An instance of UI to create interfaces


Utils ​

static Utils: Utils

An instance of Utils for general utility functions


version ​

static version: string

A reference string for BD's version


Webpack ​

static Webpack: 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 ​

BoundCommandAPI


Components ​

Get Signature ​

get Components(): Components

A set of react components plugins can make use of

Returns ​

Components


ContextMenu ​

Get Signature ​

get ContextMenu(): ContextMenu

An instance of ContextMenu for interacting with context menus

Returns ​

ContextMenu


Data ​

Get Signature ​

get Data(): BoundData

An instance of Data to manage data

Returns ​

BoundData


DOM ​

Get Signature ​

get DOM(): BoundDOM

An instance of DOM to interact with the DOM

Returns ​

BoundDOM


Hooks ​

Get Signature ​

get Hooks(): BoundHooks

An instance of Hooks for react hooks

Returns ​

BoundHooks


Logger ​

Get Signature ​

get Logger(): BoundLogger

An instance of Logger for logging information

Returns ​

BoundLogger


Net ​

Get Signature ​

get Net(): Net

An instance of Net for using network related tools

Returns ​

Net


Patcher ​

Get Signature ​

get Patcher(): BoundPatcher

An instance of Patcher to monkey patch functions

Returns ​

BoundPatcher


Plugins ​

Get Signature ​

get Plugins(): AddonAPI

An instance of AddonAPI to access plugins

Returns ​

AddonAPI


React ​

Get Signature ​

get React(): typeof React

The React module being used inside Discord

Returns ​

typeof React


ReactDOM ​

Get Signature ​

get ReactDOM(): typeof ReactDOMBase & typeof ReactDOMClient

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 ​

ReactUtils


Themes ​

Get Signature ​

get Themes(): AddonAPI

An instance of AddonAPI to access themes

Returns ​

AddonAPI


UI ​

Get Signature ​

get UI(): UI

An instance of UI to create interfaces

Returns ​

UI


Utils ​

Get Signature ​

get Utils(): Utils

An instance of Utils for general utility functions

Returns ​

Utils


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

Returns ​

Webpack