Class: MessagePrompterReactionStrategy
Extends
Implements
Constructors
new MessagePrompterReactionStrategy()
new MessagePrompterReactionStrategy(
message
:string
|MessagePayload
|MessageCreateOptions
,options
:IMessagePrompterReactionStrategyOptions
):MessagePrompterReactionStrategy
Constructor for the MessagePrompterReactionStrategy class
Parameters
Parameter | Type | Description |
---|---|---|
message | string | MessagePayload | MessageCreateOptions | The message instance for this MessagePrompter |
options | IMessagePrompterReactionStrategyOptions | Overrideable options if needed. |
Returns
MessagePrompterReactionStrategy
Overrides
MessagePrompterBaseStrategy.constructor
Defined in
Properties
appliedMessage
appliedMessage:
null
|Message
<boolean
> =null
The message that has been sent in MessagePrompter.run
Implementation of
MessagePrompterReactionStrategy.appliedMessage
Inherited from
MessagePrompterBaseStrategy.appliedMessage
Defined in
editMessage
editMessage:
undefined
|Message
<boolean
>
The message the bot will edit to send its prompt in MessagePrompter.run
Implementation of
MessagePrompterReactionStrategy.editMessage
Inherited from
MessagePrompterBaseStrategy.editMessage
Defined in
explicitReturn
explicitReturn:
boolean
Whether to return an explicit object with data, or the strategies' default
Implementation of
MessagePrompterReactionStrategy.explicitReturn
Inherited from
MessagePrompterBaseStrategy.explicitReturn
Defined in
message
message:
string
|MessagePayload
|MessageCreateOptions
The message that will be sent in MessagePrompter.run
Implementation of
MessagePrompterReactionStrategy.message
Inherited from
MessagePrompterBaseStrategy.message
Defined in
reactions
reactions:
EmojiIdentifierResolvable
[]
The emojis used
Implementation of
MessagePrompterReactionStrategy.reactions
Defined in
timeout
timeout:
number
The timeout that was used in the collector
Implementation of
MessagePrompterReactionStrategy.timeout
Inherited from
MessagePrompterBaseStrategy.timeout
Defined in
type
type:
string
The type of strategy that was used
Implementation of
MessagePrompterReactionStrategy.type
Inherited from
MessagePrompterBaseStrategy.type
Defined in
defaultStrategyOptions
static
defaultStrategyOptions:IMessagePrompterStrategyOptions
The default strategy options
Inherited from
MessagePrompterBaseStrategy.defaultStrategyOptions
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
>
Implementation of
MessagePrompterReactionStrategy.collectReactions
Inherited from
MessagePrompterBaseStrategy.collectReactions
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
Implementation of
MessagePrompterReactionStrategy.createReactionPromptFilter
Inherited from
MessagePrompterBaseStrategy.createReactionPromptFilter
Defined in
run()
run(
channel
:MessagePrompterChannelTypes
,authorOrFilter
:User
|CollectorFilter
<[MessageReaction
,User
]>):Promise
<EmojiResolvable
|IMessagePrompterExplicitReturnBase
>
This executes the MessagePrompterReactionStrategy and sends the message. The handler will wait for one (1) reaction.
Parameters
Parameter | Type | Description |
---|---|---|
channel | MessagePrompterChannelTypes | The channel to use. |
authorOrFilter | User | CollectorFilter <[MessageReaction , User ]> | An author object to validate or a CollectorFilter predicate callback. |
Returns
Promise
<EmojiResolvable
| IMessagePrompterExplicitReturnBase
>
A promise that resolves to the reaction object.
Implementation of
MessagePrompterReactionStrategy.run
Overrides
MessagePrompterBaseStrategy.run