Abstract
The client that this data provider will be used by.
Readonly
clientThe client that this data provider will be used by.
DataProvider
Abstract
deleteDelete a key-value pair in a guild and return the old value. If the key does not exist, this function should return undefined
.
The guild for which the key-value pair will be deleted.
The key to delete.
A promise that resolves the data that was deleted.
Abstract
deleteDelete a key-value pair in a global scope and return the old value. If the key does not exist, this function should return undefined
.
The key to delete.
A promise that resolves the data that was deleted.
Abstract
destroyAbstract
getGet a value for a key in a guild. If no value is found, this method should return undefined
if no defaultValue
is provided.
The guild for which the data will be queried.
The key of the data to be queried.
A promise that resolves the queried data.
Get a value for a key in a guild. If no value is found, this method should return undefined
if no defaultValue
is provided.
The guild for which the data will be queried.
The key of the data to be queried.
The default value in case there is no entry found.
A promise that resolves the queried data.
Get a value for a key in a guild. If no value is found, this method should return undefined
if no defaultValue
is provided.
The guild for which the data will be queried.
The key of the data to be queried.
Optional
defaultValue: TThe default value in case there is no entry found.
A promise that resolves the queried data.
Abstract
getGet a value for a key in a global scope. If no value is found, this method should return undefined
if no defaultValue
is provided.
The key of the data to be queried.
A promise that resolves the queried data.
Get a value for a key in a global scope. If no value is found, this method should return undefined
if no defaultValue
is provided.
The key of the data to be queried.
The default value in case there is no entry found.
A promise that resolves the queried data.
Get a value for a key in a global scope. If no value is found, this method should return undefined
if no defaultValue
is provided.
The key of the data to be queried.
Optional
defaultValue: TThe default value in case there is no entry found.
A promise that resolves the queried data.
Abstract
initInitialize this data provider. Database connection and instantiation should be done here. If the data provider is already initialized, this method should not reinitialize it.
A promise that resolves this data provider once it's ready.
client#dataProviderInit
Abstract
setSet a value for a key in a guild.
The guild for which the data will be set.
The key of the data to be set.
The value to set.
A promise that resolves once the data is saved.
Abstract
setGenerated using TypeDoc
An abstract DataProvider, it contains all the methods that need to be implemented for any DataProvider with a custom backend.