Skip to main content

Class: MessagePrompterBaseStrategy

@sapphire/discord.js-utilities.MessagePrompterBaseStrategy

Hierarchy

Constructors

constructor

โ€ข new MessagePrompterBaseStrategy(type, message, options?)

Constructor for the MessagePrompterBaseStrategy class

Parameters

NameTypeDescription
typestring-
messagestring | MessageOptions | MessagePayload-
options?IMessagePrompterStrategyOptionsOverrideable options if needed.

Defined in

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

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 | MessageOptions | MessagePayload

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:128

Methods

collectReactions

โ–ธ Protected collectReactions(channel, authorOrFilter, reactions): Promise<IMessagePrompterExplicitReturnBase>

Parameters

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

Returns

Promise<IMessagePrompterExplicitReturnBase>

Defined in

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


createReactionPromptFilter

โ–ธ Protected createReactionPromptFilter(reactions, authorOrFilter): CollectorOptions<[MessageReaction, User]>

Creates a filter for the collector to filter on

Parameters

NameType
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:113


run

โ–ธ Abstract run(channel, authorOrFilter): unknown

Parameters

NameType
channelMessagePrompterChannelTypes
authorOrFilterUser | CollectorFilter<unknown[]>

Returns

unknown

Defined in

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