Skip to main content

Class: PreconditionStore

Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:8

Extends

Constructors

new PreconditionStore()

new PreconditionStore(): PreconditionStore

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

Returns

PreconditionStore

Overrides

Store<Precondition, 'preconditions'>.constructor

Methods

chatInputRun()

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

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

Parameters

ParameterType
interactionChatInputCommandInteraction
commandChatInputCommand
contextPreconditionContext

Returns

AsyncPreconditionResult


clear()

clear(): void

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

Returns

void

Overrides

Store.clear


contextMenuRun()

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

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

Parameters

ParameterType
interactionContextMenuCommandInteraction
commandContextMenuCommand
contextPreconditionContext

Returns

AsyncPreconditionResult


delete()

delete(key: string): boolean

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

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


messageRun()

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

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

Parameters

ParameterType
messageMessage
commandMessageCommand
contextPreconditionContext

Returns

AsyncPreconditionResult


set()

set(key: string, value: Precondition): this

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

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

Returns

this

Overrides

Store.set