F

getStore

Finds one of Discord's Flux stores by name. A store already loaded and cached is returned as itself; otherwise the search is lazy unless { lazy: false } is passed, and runs on first access.

function getStore<K extends FluxStoreName>(name: K, options?: GetStoreOptions): FluxStoreOf<K>

Parameters

NameTypeDescription
nameK

The store name without its Store suffix, like 'User'.

options?GetStoreOptions

Whether to search lazily, and whether to append Store to the name.

Returns

FluxStoreOf<K>

The store, typed from FluxStores, else as a base FluxStore.