Skip to main content

Interface: IPreconditionContainer

Defined in: projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:30

An abstracted precondition container to be implemented by classes.

Since​

1.0.0

Methods​

chatInputRun()​

chatInputRun(interaction: ChatInputCommandInteraction, command: Command, context?: PreconditionContext): PreconditionContainerReturn

Defined in: projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:46

Runs a precondition container.

Parameters​

ParameterTypeDescription
interactionChatInputCommandInteractionThe interaction that ran this precondition.
commandCommandThe command the interaction invoked.
context?PreconditionContextThe context for the precondition.

Returns​

PreconditionContainerReturn

Since​

3.0.0


contextMenuRun()​

contextMenuRun(interaction: ContextMenuCommandInteraction, command: Command, context?: PreconditionContext): PreconditionContainerReturn

Defined in: projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:54

Runs a precondition container.

Parameters​

ParameterTypeDescription
interactionContextMenuCommandInteractionThe interaction that ran this precondition.
commandCommandThe command the interaction invoked.
context?PreconditionContextThe context for the precondition.

Returns​

PreconditionContainerReturn

Since​

3.0.0


messageRun()​

messageRun(message: Message, command: Command, context?: PreconditionContext): PreconditionContainerReturn

Defined in: projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:38

Runs a precondition container.

Parameters​

ParameterTypeDescription
messageMessageThe message that ran this precondition.
commandCommandThe command the message invoked.
context?PreconditionContextThe context for the precondition.

Returns​

PreconditionContainerReturn

Since​

1.0.0