new RichDisplay( [embed])
Constructs our RichDisplay 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/RichDisplay.js#L47
Properties
-
embedTemplate :external:MessageEmbed
-
The embed template
Type:
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L53
-
emojis :RichDisplayEmojisObject
-
The default emojis to use for this display
Type:
- RichDisplayEmojisObject
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L74
-
If footers have been applied to all pages
Type:
- boolean
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L89
-
<nullable> infoPage :external:MessageEmbed
-
An optional Info page/embed
Type:
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L67
-
pages :external:MessageEmbed
-
The stored pages of the display
Type:
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L60
-
<readonly> template :external:MessageEmbed
-
A new instance of the template embed
Type:
- Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L98
Methods
-
addPage(embed)
-
Adds a page to the RichDisplay
Parameters:
Name Type Description embed
function | external:MessageEmbed A callback with the embed template passed and the embed returned, or an embed. - Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L119
Returns:
this RichDisplay- Type
- RichDisplay
-
<async> run(msg [, options])
-
Runs the RichDisplay
Parameters:
Name Type Argument Default Description msg
external:Message A message to either edit, or use to send a new message for this RichDisplay options
RichDisplayRunOptions <optional>
{} The options to use while running this RichDisplay - Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L142
Returns:
- Type
- ReactionHandler
-
setEmojis(emojis)
-
Sets emojis to a new set of emojis
Parameters:
Name Type Description emojis
RichDisplayEmojisObject An object containing replacement emojis to use instead. - Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L108
Returns:
this RichDisplay- Type
- RichDisplay
-
setInfoPage(embed)
-
Adds an info page to the RichDisplay
Parameters:
Name Type Description embed
function | external:MessageEmbed A callback with the embed template passed and the embed returned, or an embed. - Since:
-
- 0.4.0
- Source:
- lib/util/RichDisplay.js#L130
Returns:
this RichDisplay- Type
- RichDisplay
Type Definitions
-
emoji
-
A single unicode character
Type:
- string
- Source:
- lib/util/RichDisplay.js#L9
-
RichDisplayEmojisObject
-
Type:
- object
- Source:
- lib/util/RichDisplay.js#L15
Properties:
Name Type Description first
emoji back
emoji forward
emoji last
emoji jump
emoji info
emoji stop
emoji -
RichDisplayRunOptions
-
Type:
- object
- Source:
- lib/util/RichDisplay.js#L27
Properties:
Name Type Argument Default Description filter
function <optional>
A filter function to add to the ReactionHandler (Recieves: Reaction, User) stop
boolean <optional>
true If a stop reaction should be included jump
boolean <optional>
true If a jump reaction should be included firstLast
boolean <optional>
true If a first and last reaction should be included prompt
string <optional>
'Which page would you like to jump to?' The prompt to be used when awaiting user input on a page to jump to startPage
number <optional>
0 The page to start the RichDisplay on max
number <optional>
The maximum total amount of reactions to collect maxEmojis
number <optional>
The maximum number of emojis to collect maxUsers
number <optional>
The maximum number of users to react time
number <optional>
The maximum amount of time before this RichDisplay should expire