Skip to main content

Interface: IPreconditionContainer

An abstracted precondition container to be implemented by classes.

Since

1.0.0

Methods

chatInputRun()

chatInputRun(interaction: ChatInputCommandInteraction<CacheType>, command: Command<Args, CommandOptions>, context?: PreconditionContext): PreconditionContainerReturn

Runs a precondition container.

Parameters

ParameterTypeDescription
interactionChatInputCommandInteraction<CacheType>The interaction that ran this precondition.
commandCommand<Args, CommandOptions>The command the interaction invoked.
context?PreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:46


contextMenuRun()

contextMenuRun(interaction: ContextMenuCommandInteraction<CacheType>, command: Command<Args, CommandOptions>, context?: PreconditionContext): PreconditionContainerReturn

Runs a precondition container.

Parameters

ParameterTypeDescription
interactionContextMenuCommandInteraction<CacheType>The interaction that ran this precondition.
commandCommand<Args, CommandOptions>The command the interaction invoked.
context?PreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:54


messageRun()

messageRun(message: Message<boolean>, command: Command<Args, CommandOptions>, context?: PreconditionContext): PreconditionContainerReturn

Runs a precondition container.

Parameters

ParameterTypeDescription
messageMessage<boolean>The message that ran this precondition.
commandCommand<Args, CommandOptions>The command the message invoked.
context?PreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Since

1.0.0

Defined in

projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:38