new ReactionHandler(msg, filter, options, display, emojis)
Constructs our ReactionHandler instance
Parameters:
Name | Type | Description |
---|---|---|
msg |
external:Message | A message this ReactionHandler should handle reactions |
filter |
function | A filter function to determine which emoji reactions should be handled |
options |
ReactionHandlerOptions | The options for this ReactionHandler |
display |
RichDisplay | RichMenu | The RichDisplay or RichMenu that this handler is for |
emojis |
Array.<emoji> | The emojis which should be used in this handler |
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L38
Extends
- ReactionCollector
Properties
-
awaiting :boolean
-
Whether the menu is awaiting a response of a prompt, to block all other jump reactions
Type:
- boolean
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L81
-
currentPage :number
-
The current page the display is on
Type:
- number
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L60
-
display :RichDisplay|RichMenu
-
The RichDisplay/RichMenu this Handler is for
Type:
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L46
-
methodMap :Map.<string, emoji>
-
An emoji to method map, to map custom emojis to static method names
Type:
- Map.<string, emoji>
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L53
-
prompt :string
-
The prompt to use when jumping pages
Type:
- string
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L67
-
reactionsDone :boolean
-
Whether reactions have finished queuing (used to handle clearing reactions on early menu selections)
Type:
- boolean
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L111
-
selection :Promise.<?number>
-
The selection of a RichMenu (useless in a RichDisplay scenario)
Type:
- Promise.<?number>
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L88
-
time :number
-
The time until the reaction collector closes automatically
Type:
- number
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L74
Methods
-
back()
-
The action to take when the "back" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L138
Returns:
- Type
- void
-
eight()
-
The action to take when the "eight" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L299
Returns:
- Type
- void
-
first()
-
The action to take when the "first" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L128
Returns:
- Type
- void
-
five()
-
The action to take when the "five" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L266
Returns:
- Type
- void
-
forward()
-
The action to take when the "forward" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L149
Returns:
- Type
- void
-
four()
-
The action to take when the "four" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L255
Returns:
- Type
- void
-
info()
-
The action to take when the "info" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L192
Returns:
- Type
- void
-
<async> jump(user)
-
The action to take when the "jump" emoji is reacted
Parameters:
Name Type Description user
external:User The user to lock the awaitMessages to - Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L171
Returns:
- Type
- void
-
last()
-
The action to take when the "last" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L160
Returns:
- Type
- void
-
nine()
-
The action to take when the "nine" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L310
Returns:
- Type
- void
-
one()
-
The action to take when the "one" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L222
Returns:
- Type
- void
-
seven()
-
The action to take when the "seven" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L288
Returns:
- Type
- void
-
six()
-
The action to take when the "six" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L277
Returns:
- Type
- void
-
stop()
-
The action to take when the "stop" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L201
Returns:
- Type
- void
-
three()
-
The action to take when the "three" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L244
Returns:
- Type
- void
-
two()
-
The action to take when the "two" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L233
Returns:
- Type
- void
-
update()
-
Updates the display page
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L321
Returns:
- Type
- void
-
zero()
-
The action to take when the "zero" emoji is reacted
- Since:
-
- 0.4.0
- Source:
- lib/util/ReactionHandler.js#L211
Returns:
- Type
- void
Type Definitions
-
emoji
-
A single unicode character
Type:
- string
- Source:
- lib/util/ReactionHandler.js#L10