new RichMenu( [embed])
Constructs our RichMenu instance
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
embed |
external:MessageEmbed |
<optional> |
new MessageEmbed() | A Template embed to apply to all pages |
- Since:
-
- 0.4.0
- Source:
- lib/util/RichMenu.js#L63
Extends
Properties
-
embedTemplate :external:MessageEmbed
-
The embed template
Type:
- Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L53
-
emojis :RichMenuEmojisObject
-
The default emojis to use for this menu
Type:
- RichMenuEmojisObject
- Since:
-
- 0.4.0
- Overrides:
- Source:
- lib/util/RichMenu.js#L66
-
If footers have been applied to all pages
Type:
- boolean
- Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L89
-
<nullable> infoPage :external:MessageEmbed
-
An optional Info page/embed
Type:
- Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L67
-
options :Array.<MenuOption>
-
The options of this Menu
Type:
- Array.<MenuOption>
- Since:
-
- 0.4.0
- Source:
- lib/util/RichMenu.js#L97
-
pages :external:MessageEmbed
-
The stored pages of the display
Type:
- Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L60
-
paginated :boolean
-
If options have been paginated yet
Type:
- boolean
- Since:
-
- 0.4.0
- Source:
- lib/util/RichMenu.js#L90
-
<readonly> template :external:MessageEmbed
-
A new instance of the template embed
Type:
- Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L98
Methods
-
addOption(name, body [, inline])
-
Adds a MenuOption
Parameters:
Name Type Argument Default Description namestring The name of the option bodystring The description of the option inlineboolean <optional>
false Whether the option should be inline - Since:
-
- 0.4.0
- Source:
- lib/util/RichMenu.js#L116
Returns:
this RichMenu- Type
- RichMenu
-
addPage()
-
- Since:
-
- 0.4.0
- Overrides:
- Source:
- lib/util/RichMenu.js#L104
Throws:
You cannot directly add pages in a RichMenu -
<async> run(msg, options)
-
Runs this RichMenu
Parameters:
Name Type Description msgexternal:Message A message to edit or use to send a new message with optionsRichMenuRunOptions The options to use with this RichMenu - Since:
-
- 0.4.0
- Overrides:
- Source:
- lib/util/RichMenu.js#L128
Returns:
- Type
- ReactionHandler
-
setEmojis(emojis)
-
Sets emojis to a new set of emojis
Parameters:
Name Type Description emojisRichDisplayEmojisObject An object containing replacement emojis to use instead. - Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L108
Returns:
this RichDisplay- Type
- RichDisplay
-
setInfoPage(embed)
-
Adds an info page to the RichDisplay
Parameters:
Name Type Description embedfunction | external:MessageEmbed A callback with the embed template passed and the embed returned, or an embed. - Since:
-
- 0.4.0
- Inherited From:
- Overrides:
- Source:
- lib/util/RichDisplay.js#L130
Returns:
this RichDisplay- Type
- RichDisplay
Type Definitions
-
emoji
-
A single unicode character
Type:
- string
- Source:
- lib/util/RichMenu.js#L9
-
MenuOption
-
Type:
- object
- Source:
- lib/util/RichMenu.js#L37
Properties:
Name Type Argument Default Description namestring The name of the option bodystring The description of the option inlineboolean <optional>
false Whether the option should be inline -
ReactionHandlerOptions
-
Type:
- object
- Source:
- lib/util/ReactionHandler.js#L16
Properties:
Name Type Argument Default Description filterfunction <optional>
A filter function to add to the ReactionHandler stopboolean <optional>
true If a stop reaction should be included promptstring <optional>
'Which page would you like to jump to?' The prompt to be used when awaiting user input on a page to jump to startPagenumber <optional>
0 The page to start the RichMenu on maxnumber <optional>
The maximum total amount of reactions to collect maxEmojisnumber <optional>
The maximum number of emojis to collect maxUsersnumber <optional>
The maximum number of users to react timenumber <optional>
The maximum amount of time before this RichMenu should expire -
RichMenuEmojisObject
-
Type:
- object
- Source:
- lib/util/RichMenu.js#L15
Properties:
Name Type Description firstemoji backemoji forwardemoji lastemoji jumpemoji infoemoji stopemoji zeroemoji oneemoji twoemoji threeemoji fouremoji fiveemoji sixemoji sevenemoji eightemoji nineemoji -
RichMenuRunOptions
-
Type:
- object
- Source:
- lib/util/RichMenu.js#L45
Properties:
Name Type Argument Default Description filterfunction <optional>
A filter function to add to the ReactionHandler (Recieves: Reaction, User) stopboolean <optional>
true If a stop reaction should be included promptstring <optional>
'Which page would you like to jump to?' The prompt to be used when awaiting user input on a page to jump to startPagenumber <optional>
0 The page to start the RichMenu on maxnumber <optional>
The maximum total amount of reactions to collect maxEmojisnumber <optional>
The maximum number of emojis to collect maxUsersnumber <optional>
The maximum number of users to react timenumber <optional>
The maximum amount of time before this RichMenu should expire