Skip to main content

Class: abstract MessagePrompterBaseStrategy

Extended by

Constructors

new MessagePrompterBaseStrategy()

new MessagePrompterBaseStrategy(type: string, message: string | MessagePayload | MessageCreateOptions, options?: IMessagePrompterStrategyOptions): MessagePrompterBaseStrategy

Constructor for the MessagePrompterBaseStrategy class

Parameters

ParameterTypeDescription
typestringThe type of message prompter strategy
messagestring | MessagePayload | MessageCreateOptionsThe message that this prompt is for
options?IMessagePrompterStrategyOptionsOverrideable options if needed.

Returns

MessagePrompterBaseStrategy

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:45

Properties

appliedMessage

appliedMessage: null | Message<boolean> = null

The message that has been sent in MessagePrompter.run

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:27


editMessage

editMessage: undefined | Message<boolean>

The message the bot will edit to send its prompt in MessagePrompter.run

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:37


explicitReturn

explicitReturn: boolean

Whether to return an explicit object with data, or the strategies' default

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:22


message

message: string | MessagePayload | MessageCreateOptions

The message that will be sent in MessagePrompter.run

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:32


timeout

timeout: number

The timeout that was used in the collector

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:17


type

type: string

The type of strategy that was used

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:12


defaultStrategyOptions

static defaultStrategyOptions: IMessagePrompterStrategyOptions

The default strategy options

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:129

Methods

collectReactions()

protected collectReactions(channel: MessagePrompterChannelTypes, authorOrFilter: User | CollectorFilter<[MessageReaction, User]>, reactions: string[] | EmojiIdentifierResolvable[]): Promise<IMessagePrompterExplicitReturnBase>

Parameters

ParameterType
channelMessagePrompterChannelTypes
authorOrFilterUser | CollectorFilter<[MessageReaction, User]>
reactionsstring[] | EmojiIdentifierResolvable[]

Returns

Promise<IMessagePrompterExplicitReturnBase>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:55


createReactionPromptFilter()

protected createReactionPromptFilter(reactions: string[] | EmojiIdentifierResolvable[], authorOrFilter: User | CollectorFilter<[MessageReaction, User]>): CollectorOptions<[MessageReaction, User]>

Creates a filter for the collector to filter on

Parameters

ParameterType
reactionsstring[] | EmojiIdentifierResolvable[]
authorOrFilterUser | CollectorFilter<[MessageReaction, User]>

Returns

CollectorOptions<[MessageReaction, User]>

The filter for awaitReactions function

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:114


run()

abstract run(channel: MessagePrompterChannelTypes, authorOrFilter: User | CollectorFilter<unknown[]>): unknown

Parameters

ParameterType
channelMessagePrompterChannelTypes
authorOrFilterUser | CollectorFilter<unknown[]>

Returns

unknown

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/MessagePrompter/strategies/MessagePrompterBaseStrategy.ts:53