Discord Player

Context

No description provided

Context

new Context(defaultValue);
ParameterTypeOptional
defaultValueT

Properties

public isLost: any

Whether the context is lost

Methods

public consume(): undefined | T

Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.

public exit(scope): void

Exit out of this context

ParameterTypeOptional
scopeContextReceiver<void>

public provide(value, receiver): R

Run a function within the context of this provider

ParameterTypeOptional
valueT
receiverContextReceiver<R>

On this page