Skip to main content

Class: PreconditionStore

Extends

Constructors

new PreconditionStore()

new PreconditionStore(): PreconditionStore

Returns

PreconditionStore

Overrides

Store<Precondition, 'preconditions'>.constructor

Source

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

Properties

globalPreconditions

private readonly globalPreconditions: Precondition <PreconditionOptions>[] = []

Source

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

Methods

chatInputRun()

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

Parameters

ParameterType
interactionChatInputCommandInteraction <CacheType>
commandChatInputCommand
contextPreconditionContext

Returns

AsyncPreconditionResult

Source

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


clear()

clear(): void

Returns

void

Overrides

Store.clear

Source

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

Source

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


delete()

delete(key: string): boolean

Parameters

ParameterType
keystring

Returns

boolean

Overrides

Store.delete

Source

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

Source

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


set()

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

Parameters

ParameterType
keystring
valuePrecondition <PreconditionOptions>

Returns

this

Overrides

Store.set

Source

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