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: readonlyIPreconditionContainer[],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
| Parameter | Type | Description |
|---|---|---|
interaction | ChatInputCommandInteraction | The interaction that ran this precondition. |
command | ChatInputCommand | The command the interaction invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
Since
3.0.0
chatInputSequential()
chatInputSequential(
interaction:ChatInputCommandInteraction,command:ChatInputCommand,entries: readonlyIPreconditionContainer[],context:PreconditionContext):PreconditionContainerReturn
Defined in: projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:52
Runs the containers one by one.
Parameters
| Parameter | Type | Description |
|---|---|---|
interaction | ChatInputCommandInteraction | The interaction that ran this precondition. |
command | ChatInputCommand | The command the interaction invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
PreconditionRunMode.Sequential
Since
3.0.0
contextMenuParallel()
contextMenuParallel(
interaction:ContextMenuCommandInteraction,command:ContextMenuCommand,entries: readonlyIPreconditionContainer[],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
| Parameter | Type | Description |
|---|---|---|
interaction | ContextMenuCommandInteraction | The interaction that ran this precondition. |
command | ContextMenuCommand | The command the interaction invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
Since
3.0.0
contextMenuSequential()
contextMenuSequential(
interaction:ContextMenuCommandInteraction,command:ContextMenuCommand,entries: readonlyIPreconditionContainer[],context:PreconditionContext):PreconditionContainerReturn
Defined in: projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:84
Runs the containers one by one.
Parameters
| Parameter | Type | Description |
|---|---|---|
interaction | ContextMenuCommandInteraction | The interaction that ran this precondition. |
command | ContextMenuCommand | The command the interaction invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
PreconditionRunMode.Sequential
Since
3.0.0
messageParallel()
messageParallel(
message:Message,command:MessageCommand,entries: readonlyIPreconditionContainer[],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
| Parameter | Type | Description |
|---|---|---|
message | Message | The message that ran this precondition. |
command | MessageCommand | The command the message invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
Since
1.0.0
messageSequential()
messageSequential(
message:Message,command:MessageCommand,entries: readonlyIPreconditionContainer[],context:PreconditionContext):PreconditionContainerReturn
Defined in: projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:20
Runs the containers one by one.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | Message | The message that ran this precondition. |
command | MessageCommand | The command the message invoked. |
entries | readonly IPreconditionContainer[] | The containers to run. |
context | PreconditionContext | The context for the precondition. |
Returns
Seealso
PreconditionRunMode.Sequential
Since
1.0.0