Interface: IPreconditionCondition
Defines the condition for PreconditionContainerArrays to run.
Since
1.0.0
Methods
chatInputParallel()
chatInputParallel(
interaction
:ChatInputCommandInteraction
<CacheType
>,command
:ChatInputCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs all the containers using Promise.all
, then checks the results once all tasks finished running.
Parameters
Parameter | Type | Description |
---|---|---|
interaction | ChatInputCommandInteraction <CacheType > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:68
chatInputSequential()
chatInputSequential(
interaction
:ChatInputCommandInteraction
<CacheType
>,command
:ChatInputCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs the containers one by one.
Parameters
Parameter | Type | Description |
---|---|---|
interaction | ChatInputCommandInteraction <CacheType > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:52
contextMenuParallel()
contextMenuParallel(
interaction
:ContextMenuCommandInteraction
<CacheType
>,command
:ContextMenuCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs all the containers using Promise.all
, then checks the results once all tasks finished running.
Parameters
Parameter | Type | Description |
---|---|---|
interaction | ContextMenuCommandInteraction <CacheType > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:100
contextMenuSequential()
contextMenuSequential(
interaction
:ContextMenuCommandInteraction
<CacheType
>,command
:ContextMenuCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs the containers one by one.
Parameters
Parameter | Type | Description |
---|---|---|
interaction | ContextMenuCommandInteraction <CacheType > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:84
messageParallel()
messageParallel(
message
:Message
<boolean
>,command
:MessageCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs all the containers using Promise.all
, then checks the results once all tasks finished running.
Parameters
Parameter | Type | Description |
---|---|---|
message | Message <boolean > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:36
messageSequential()
messageSequential(
message
:Message
<boolean
>,command
:MessageCommand
,entries
: readonlyIPreconditionContainer
[],context
:PreconditionContext
):PreconditionContainerReturn
Runs the containers one by one.
Parameters
Parameter | Type | Description |
---|---|---|
message | Message <boolean > | 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
Defined in
projects/framework/src/lib/utils/preconditions/conditions/IPreconditionCondition.ts:20