GuildStorage

Class containing asynchronous methods for storing, retrieving, and interacting with data for a specific guild. Can not be created directly via a constructor due to mixin mechanics. Created internally via StorageFactory#createGuildStorage

Constructor

new GuildStorage()

Mixes In:
Source:

Properties

.settings: GuildSettings

GuildSettings object containing settings for this guild

Type:
GuildSettings
Source:

Methods

.clear() → Promise<void>

Remove all key/value pairs from storage for this Guild

Source:
Returns:
Promise<void>

.get(key: string) → Promise<any>

Get a value from storage for this Guild

Parameters:
Name Type Description
key
string

The key in storage to get

Source:
Returns:
Promise<any>

.init() → Promise<void>

Initialize this storage instance

Source:
Returns:
Promise<void>

.keys() → Promise<string[]>

Get the names of all keys in this storage for this Guild

Source:
Returns:
Promise<string[]>

.remove(key: string) → Promise<void>

Remove a value from storage for this Guild

Parameters:
Name Type Description
key
string

The key in storage to remove

Source:
Returns:
Promise<void>

.set(key: string, value: any) → Promise<void>

Set a value in storage for this Guild

Parameters:
Name Type Description
key
string

The key in storage to set

value
any

The value to set

Source:
Returns:
Promise<void>