Canvacord

BuilderOptionsManager

Creates a new builder options manager.

new BuilderOptionsManager(options)
ParameterTypeDescriptionOptional
options
T

The options to use

Methods

get(key);

Get an option by name.

ParameterTypeDescriptionOptional
key
K

The option name

Returns:T[K]

The option value

getOptions();

Returns the options.

Returns:T

merge(key, value);

Merge new data to old data on an option by name.

ParameterTypeOptional
key
K
value
Partial<T[K]>
Returns:void

set(key, value);

Set an option by name.

ParameterTypeDescriptionOptional
key
K

The option name

value
T[K]

The option value

Returns:void

setOptions(options);

Sets the options. This will override the previous options.

ParameterTypeDescriptionOptional
options
T

The options to use

Returns:void