Class: MessagePrompterBaseStrategy
@sapphire/discord.js-utilities.MessagePrompterBaseStrategy
Hierarchy
-
MessagePrompterBaseStrategy
↳
MessagePrompterConfirmStrategy
↳
MessagePrompterMessageStrategy
Constructors
constructor
• new MessagePrompterBaseStrategy(type
, message
, options?
): MessagePrompterBaseStrategy
Constructor for the MessagePrompterBaseStrategy class
Parameters
Name | Type | Description |
---|---|---|
type | string | - |
message | string | MessagePayload | MessageCreateOptions | - |
options? | IMessagePrompterStrategyOptions | Overrideable options if needed. |
Returns
Defined in
Properties
appliedMessage
• appliedMessage: null
| Message
<boolean
> = null
The message that has been sent in MessagePrompter.run
Defined in
editMessage
• editMessage: undefined
| Message
<boolean
>
The message the bot will edit to send its prompt in MessagePrompter.run
Defined in
explicitReturn
• explicitReturn: boolean
Whether to return an explicit object with data, or the strategies' default
Defined in
message
• message: string
| MessagePayload
| MessageCreateOptions
The message that will be sent in MessagePrompter.run
Defined in
timeout
• timeout: number
The timeout that was used in the collector
Defined in
type
• type: string
The type of strategy that was used
Defined in
defaultStrategyOptions
▪ Static
defaultStrategyOptions: IMessagePrompterStrategyOptions
The default strategy options
Defined in
Methods
collectReactions
▸ collectReactions(channel
, authorOrFilter
, reactions
): Promise
<IMessagePrompterExplicitReturnBase
>
Parameters
Name | Type |
---|---|
channel | MessagePrompterChannelTypes |
authorOrFilter | User | CollectorFilter <[MessageReaction , User ]> |
reactions | string [] | EmojiIdentifierResolvable [] |
Returns
Promise
<IMessagePrompterExplicitReturnBase
>
Defined in
createReactionPromptFilter
▸ createReactionPromptFilter(reactions
, authorOrFilter
): CollectorOptions
<[MessageReaction
, User
]>
Creates a filter for the collector to filter on
Parameters
Name | Type |
---|---|
reactions | string [] | EmojiIdentifierResolvable [] |
authorOrFilter | User | CollectorFilter <[MessageReaction , User ]> |
Returns
CollectorOptions
<[MessageReaction
, User
]>
The filter for awaitReactions function
Defined in
run
▸ run(channel
, authorOrFilter
): unknown
Parameters
Name | Type |
---|---|
channel | MessagePrompterChannelTypes |
authorOrFilter | User | CollectorFilter <unknown []> |
Returns
unknown