Skip to main content

Interface: IPreconditionCondition

Defines the condition for PreconditionContainerArrays to run.

Since

1.0.0

Methods

chatInputParallel()

chatInputParallel(interaction: ChatInputCommandInteraction<CacheType>, command: ChatInputCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs all the containers using Promise.all, then checks the results once all tasks finished running.

Parameters

ParameterTypeDescription
interactionChatInputCommandInteraction<CacheType>The interaction that ran this precondition.
commandChatInputCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Parallel

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:68


chatInputSequential()

chatInputSequential(interaction: ChatInputCommandInteraction<CacheType>, command: ChatInputCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs the containers one by one.

Parameters

ParameterTypeDescription
interactionChatInputCommandInteraction<CacheType>The interaction that ran this precondition.
commandChatInputCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Sequential

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:52


contextMenuParallel()

contextMenuParallel(interaction: ContextMenuCommandInteraction<CacheType>, command: ContextMenuCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs all the containers using Promise.all, then checks the results once all tasks finished running.

Parameters

ParameterTypeDescription
interactionContextMenuCommandInteraction<CacheType>The interaction that ran this precondition.
commandContextMenuCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Parallel

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:100


contextMenuSequential()

contextMenuSequential(interaction: ContextMenuCommandInteraction<CacheType>, command: ContextMenuCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs the containers one by one.

Parameters

ParameterTypeDescription
interactionContextMenuCommandInteraction<CacheType>The interaction that ran this precondition.
commandContextMenuCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Sequential

Since

3.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:84


messageParallel()

messageParallel(message: Message<boolean>, command: MessageCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs all the containers using Promise.all, then checks the results once all tasks finished running.

Parameters

ParameterTypeDescription
messageMessage<boolean>The message that ran this precondition.
commandMessageCommandThe command the message invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Parallel

Since

1.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:36


messageSequential()

messageSequential(message: Message<boolean>, command: MessageCommand, entries: readonly IPreconditionContainer[], context: PreconditionContext): PreconditionContainerReturn

Runs the containers one by one.

Parameters

ParameterTypeDescription
messageMessage<boolean>The message that ran this precondition.
commandMessageCommandThe command the message invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContextThe context for the precondition.

Returns

PreconditionContainerReturn

Seealso

PreconditionRunMode.Sequential

Since

1.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:20