Skip to main content

Class: abstract AllFlowsPrecondition

Defined in: projects/framework/src/lib/structures/Precondition.ts:61

Extends

Constructors

new AllFlowsPrecondition()

new AllFlowsPrecondition(context: LoaderContext, options: PreconditionOptions): AllFlowsPrecondition

Defined in: projects/framework/src/lib/structures/Precondition.ts:24

Parameters

ParameterType
contextLoaderContext
optionsPreconditionOptions

Returns

AllFlowsPrecondition

Inherited from

Precondition.constructor

Properties

position

readonly position: null | number

Defined in: projects/framework/src/lib/structures/Precondition.ts:22

Inherited from

Precondition.position

Methods

chatInputRun()

abstract chatInputRun(interaction: ChatInputCommandInteraction, command: ChatInputCommand, context: PreconditionContext): PreconditionResult

Defined in: projects/framework/src/lib/structures/Precondition.ts:64

Parameters

ParameterType
interactionChatInputCommandInteraction
commandChatInputCommand
contextPreconditionContext

Returns

PreconditionResult

Overrides

Precondition.chatInputRun


contextMenuRun()

abstract contextMenuRun(interaction: ContextMenuCommandInteraction, command: ContextMenuCommand, context: PreconditionContext): PreconditionResult

Defined in: projects/framework/src/lib/structures/Precondition.ts:70

Parameters

ParameterType
interactionContextMenuCommandInteraction
commandContextMenuCommand
contextPreconditionContext

Returns

PreconditionResult

Overrides

Precondition.contextMenuRun


error()

error(options: Omit<Options, "precondition">): PreconditionResult

Defined in: projects/framework/src/lib/structures/Precondition.ts:47

Constructs a PreconditionError with the precondition parameter set to this.

Parameters

ParameterTypeDescription
optionsOmit<Options, "precondition">The information.

Returns

PreconditionResult

Inherited from

Precondition.error


fetchChannelFromInteraction()

protected fetchChannelFromInteraction(interaction: CommandInteraction): Promise<TextBasedChannel>

Defined in: projects/framework/src/lib/structures/Precondition.ts:51

Parameters

ParameterType
interactionCommandInteraction

Returns

Promise<TextBasedChannel>

Inherited from

Precondition.fetchChannelFromInteraction


messageRun()

abstract messageRun(message: Message, command: MessageCommand, context: PreconditionContext): PreconditionResult

Defined in: projects/framework/src/lib/structures/Precondition.ts:62

Parameters

ParameterType
messageMessage
commandMessageCommand
contextPreconditionContext

Returns

PreconditionResult

Overrides

Precondition.messageRun


ok()

ok(): PreconditionResult

Defined in: projects/framework/src/lib/structures/Precondition.ts:39

Returns

PreconditionResult

Inherited from

Precondition.ok