Skip to content

Data

Data is a simple utility class for the management of plugin data. An instance is available on BdApi.

Properties

Methods

delete

Deletes a piece of stored data. This is different than saving null or undefined.

ParameterTypeDescription
pluginNamestringName of the plugin deleting data
keystringWhich piece of data to delete.

Returns: void


load

Loads previously stored data.

ParameterTypeDescription
pluginNamestringName of the plugin loading data
keystringWhich piece of data to load

Returns: any - The stored data


save

Saves JSON-serializable data.

ParameterTypeDescription
pluginNamestringName of the plugin saving data
keystringWhich piece of data to store
dataanyThe data to be saved

Returns: void