MessageReactionPages

Create pages reaction with this class.

Constructor

new DBP.MessageReactionPages(data);

Paramenter Type Optional Default Description
data

✔️

{}

Easily making reaction page embeds use MessageReactionPages.

reset()

Properties

.embeds

The embed of discord.js MessageEmbed

Type: ?Array <MessageEmbed>


.replyMention

The reply will mention the user

Type: ?Boolean


.reply

The reply of this MessageReactionPages

Type: ?Boolean


.duration

The duration of this option functions to stop embed pages according to the time set

Type: ?Number


.countPage

The counting page of this MessageReactionPages

Type: ?Boolean


.emoji

The emoji of this MessageReactionPages

Type: ?Array < string >


Examples of use Array for emoji options
["option 1", "option 2", "option 3"]

Description :
option 1 -> For previous reaction.
option 2 -> For stop reaction.
option 3 -> For stop reaction.

reset()

Methods

.setEmbeds([embed])

Set embed discord.js to this MessageReactionPages.

Paramenter Type Description
embed

The embed of discord.js MessageEmbed.

Returns: Array <MessageEmbed>



.setReply(reply, { replyMention: mention })

Set channel of this MessageReactionPages.

Paramenter Type Default Description
reply false

The reply of this MessageButtonPages.

mention true

The reply mention of this MessageButtonPages.

Returns: String



.setDuration(time)

Set duration of this MessageReactionPages.

Paramenter Type Default Description
time 30000

The duration when bot will stop the embed pages.

Returns: Number



.setCountPage(count)

Set count pages of this MessageReactionPages.

Paramenter Type Default Description
count true

The count pages of this MessageReactionPages.

Returns: Boolean



.setEmojiReaction([previous, stop, next])

Set emoji of this MessageReactionPages.

Paramenter Type Default Description
previous ⬅️

The emoji previous of button.

stop

The emoji stop of button.

next ➡️

The emoji next of button.

Returns: Array < string >



.toJSON()

Transforms the MessageReactionPages to a plain object.

Returns: MessageReactionPages

The raw data of this MessageReactionPages