Skip to main content

Interface: IPreconditionCondition

Defined in: projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:10

Defines the condition for PreconditionContainerArrays to run.

Since

1.0.0

Methods

chatInputParallel()

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

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

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

Parameters

ParameterTypeDescription
interactionChatInputCommandInteractionThe 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


chatInputSequential()

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

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

Runs the containers one by one.

Parameters

ParameterTypeDescription
interactionChatInputCommandInteractionThe 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


contextMenuParallel()

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

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

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

Parameters

ParameterTypeDescription
interactionContextMenuCommandInteractionThe 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


contextMenuSequential()

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

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

Runs the containers one by one.

Parameters

ParameterTypeDescription
interactionContextMenuCommandInteractionThe 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


messageParallel()

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

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

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

Parameters

ParameterTypeDescription
messageMessageThe 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


messageSequential()

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

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

Runs the containers one by one.

Parameters

ParameterTypeDescription
messageMessageThe 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