Constructor
new DBP.MessageButtonPages(data);
new DBP.MessageButtonPages(data);
Paramenter | Type | Optional | Default | Description |
---|---|---|---|---|
data |
✔️ |
{}
|
Easily making button page embeds use MessageButtonPages. |
reset()
Properties
.embedsThe embed of discord.js MessageEmbed
Type: ?Array <MessageEmbed>.channel
The channel will send message
Type: ?String <MessageChannelType>.messageDM
This paramenter will send an message/text when the bot success send.
DM
channel
Type: ?String
.duration
The duration of this option functions to stop embed pages according to the time set
Type: ?Number.countPage
The counting page of this MessageButtonPages
Type: ?Boolean.label
The label of this MessageButtonPages
Type: ?Array < string >.emoji
The emoji of this MessageButtonPages
Type: ?Array < string >.color
The color of this MessageButtonPages
Type: ?Array <MessageButtonColor>Examples of use Array for label, emoji, color options
["option 1", "option 2", "option 3"]
Description :
option 1 -> For previous button.
option 2 -> For stop button.
option 3 -> For stop button.
reset()
Methods
.setEmbeds([embed])
Set embed discord.js to this MessageButtonPages.
Paramenter | Type | Description |
---|---|---|
embed |
The embed of discord.js MessageEmbed. |
.setChannel(channel)
Set channel of this MessageButtonPages.
Paramenter | Type | Default | Description |
---|---|---|---|
channel |
CHANNEL
|
The channel of discord Message Channel. |
.setMessageDM(text)
The message dm of this MessageButtonPages.
Paramenter | Type | Description |
---|---|---|
text |
This paramenter will send an message/text when the bot success send.
This paramenter will work if the options channel is
DM
channel
|
.setDuration(time)
Set duration of this MessageButtonPages.
Paramenter | Type | Default | Description |
---|---|---|---|
time |
30000
|
The duration when bot will stop the embed pages. |
.setCountPage(count)
Set count pages of this MessageButtonPages.
Paramenter | Type | Default | Description |
---|---|---|---|
count |
true
|
The count pages of this MessageButtonPages. |
.setLabelButton([previous, stop, next])
Set label of this MessageButtonPages.
.setEmojiButton([previous, stop, next])
Set emoji of this MessageButtonPages.
.setColorButton([previous, stop, next])
Set color of this MessageButtonPages.
Paramenter | Type | Default | Description |
---|---|---|---|
previous |
PRIMARY
|
Customing previous color the button. |
|
stop |
DANGER
|
Customing stop color the button. |
|
next |
PRIMARY
|
Customing next color the button. |
.toJSON()
Transforms the MessageButtonPages to a plain object.