Skip to main content

Interface: IPreconditionCondition

Defines the condition for PreconditionContainerArrays to run.

since 1.0.0

Methods

chatInputParallel

chatInputParallel(interaction, command, entries, context): PreconditionContainerReturn

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

seealso {@link PreconditionRunMode.parallel}

since 3.0.0

Parameters

NameTypeDescription
interactionCommandInteraction<CacheType>The interaction that ran this precondition.
commandChatInputCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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


chatInputSequential

chatInputSequential(interaction, command, entries, context): PreconditionContainerReturn

Runs the containers one by one.

seealso {@link PreconditionRunMode.sequential}

since 3.0.0

Parameters

NameTypeDescription
interactionCommandInteraction<CacheType>The interaction that ran this precondition.
commandChatInputCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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


contextMenuParallel

contextMenuParallel(interaction, command, entries, context): PreconditionContainerReturn

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

seealso {@link PreconditionRunMode.parallel}

since 3.0.0

Parameters

NameTypeDescription
interactionContextMenuInteraction<CacheType>The interaction that ran this precondition.
commandContextMenuCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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


contextMenuSequential

contextMenuSequential(interaction, command, entries, context): PreconditionContainerReturn

Runs the containers one by one.

seealso {@link PreconditionRunMode.sequential}

since 3.0.0

Parameters

NameTypeDescription
interactionContextMenuInteraction<CacheType>The interaction that ran this precondition.
commandContextMenuCommandThe command the interaction invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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


messageParallel

messageParallel(message, command, entries, context): PreconditionContainerReturn

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

seealso {@link PreconditionRunMode.parallel}

since 1.0.0

Parameters

NameTypeDescription
messageMessage<boolean>The message that ran this precondition.
commandMessageCommandThe command the message invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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


messageSequential

messageSequential(message, command, entries, context): PreconditionContainerReturn

Runs the containers one by one.

seealso {@link PreconditionRunMode.sequential}

since 1.0.0

Parameters

NameTypeDescription
messageMessage<boolean>The message that ran this precondition.
commandMessageCommandThe command the message invoked.
entriesreadonly IPreconditionContainer[]The containers to run.
contextPreconditionContext-

Returns

PreconditionContainerReturn

Defined in

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