Skip to main content

Class: PreconditionStore

Extends

Constructors

new PreconditionStore()

new PreconditionStore(): PreconditionStore

Returns

PreconditionStore

Overrides

Store<Precondition, 'preconditions'>.constructor

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:11

Methods

chatInputRun()

chatInputRun(interaction: ChatInputCommandInteraction<CacheType>, command: ChatInputCommand, context: PreconditionContext): AsyncPreconditionResult

Parameters

ParameterType
interactionChatInputCommandInteraction<CacheType>
commandChatInputCommand
contextPreconditionContext

Returns

AsyncPreconditionResult

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:32


clear()

clear(): void

Returns

void

Overrides

Store.clear

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:95


contextMenuRun()

contextMenuRun(interaction: ContextMenuCommandInteraction<CacheType>, command: ContextMenuCommand, context: PreconditionContext): AsyncPreconditionResult

Parameters

ParameterType
interactionContextMenuCommandInteraction<CacheType>
commandContextMenuCommand
contextPreconditionContext

Returns

AsyncPreconditionResult

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:53


delete()

delete(key: string): boolean

Parameters

ParameterType
keystring

Returns

boolean

true if an element in the Map existed and has been removed, or false if the element does not exist.

Overrides

Store.delete

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:86


messageRun()

messageRun(message: Message<boolean>, command: MessageCommand, context: PreconditionContext): AsyncPreconditionResult

Parameters

ParameterType
messageMessage<boolean>
commandMessageCommand
contextPreconditionContext

Returns

AsyncPreconditionResult

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:15


set()

set(key: string, value: Precondition<PreconditionOptions>): this

Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

Parameters

ParameterType
keystring
valuePrecondition<PreconditionOptions>

Returns

this

Overrides

Store.set

Defined in

projects/framework/src/lib/structures/PreconditionStore.ts:74