Class: abstract
MessagePrompterBaseStrategy
Extended by
MessagePrompterConfirmStrategy
MessagePrompterMessageStrategy
MessagePrompterNumberStrategy
MessagePrompterReactionStrategy
Constructors
new MessagePrompterBaseStrategy()
new MessagePrompterBaseStrategy(
type
:string
,message
:string
|MessagePayload
|MessageCreateOptions
,options
?:IMessagePrompterStrategyOptions
):MessagePrompterBaseStrategy
Constructor for the MessagePrompterBaseStrategy class
Parameters
Parameter | Type | Description |
---|---|---|
type | string | The type of message prompter strategy |
message | string | MessagePayload | MessageCreateOptions | The message that this prompt is for |
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()
protected
collectReactions(channel
:MessagePrompterChannelTypes
,authorOrFilter
:User
|CollectorFilter
<[MessageReaction
,User
]>,reactions
:string
[] |EmojiIdentifierResolvable
[]):Promise
<IMessagePrompterExplicitReturnBase
>
Parameters
Parameter | Type |
---|---|
channel | MessagePrompterChannelTypes |
authorOrFilter | User | CollectorFilter <[MessageReaction , User ]> |
reactions | string [] | EmojiIdentifierResolvable [] |
Returns
Promise
<IMessagePrompterExplicitReturnBase
>
Defined in
createReactionPromptFilter()
protected
createReactionPromptFilter(reactions
:string
[] |EmojiIdentifierResolvable
[],authorOrFilter
:User
|CollectorFilter
<[MessageReaction
,User
]>):CollectorOptions
<[MessageReaction
,User
]>
Creates a filter for the collector to filter on
Parameters
Parameter | Type |
---|---|
reactions | string [] | EmojiIdentifierResolvable [] |
authorOrFilter | User | CollectorFilter <[MessageReaction , User ]> |
Returns
CollectorOptions
<[MessageReaction
, User
]>
The filter for awaitReactions function
Defined in
run()
abstract
run(channel
:MessagePrompterChannelTypes
,authorOrFilter
:User
|CollectorFilter
<unknown
[]>):unknown
Parameters
Parameter | Type |
---|---|
channel | MessagePrompterChannelTypes |
authorOrFilter | User | CollectorFilter <unknown []> |
Returns
unknown