GuildStorageRegistry

new GuildStorageRegistry()

Stores all guild-specific storages as <string, GuildStorage> pairs, where string is the guild's ID string

Extends

Methods

.findAll(key: string, value: *)Collection<string, GuildStorage>

Return a Collection of GuildStorage items that have the provided key and value
Parameters:
Name Type Description
key
string
Setting key to match
value
*
Value to match
Returns:
Collection<string, GuildStorage>

.findAllBySetting(key: string, value: *)Collection<string, GuildStorage>

Return a Collection of GuildStorage items that have the provided setting key and value
Parameters:
Name Type Description
key
string
Setting key to match
value
*
Value to match
Returns:
Collection<string, GuildStorage>

.get(guild: Guild)GuildStorage

Get the GuildStorage by Guild or guild id string
Parameters:
Name Type Description
guild
Guild
|
string
Guild object or guild id string
Returns:
GuildStorage

.resetAllGuildSettings(defaults: DefaultGuildSettings)

Reset all guild settings to default, deleting any extra settings that are not part of the DefaultGuildSettings
Parameters:
Name Type Description
defaults
DefaultGuildSettings
Should always use DefaultGuildSettings