Constructor
new DBP.InteractionButtonPages(data);
new DBP.InteractionButtonPages(data);
Paramenter | Type | Optional | Default | Description |
---|---|---|---|---|
data |
✔️ |
{}
|
Easily making interaction/application button page embeds with InteractionButtonPages. |
reset()
Properties
.embedsThe embed of discord.js MessageEmbed
Type: ?Array <MessageEmbed>.ephemeral
The ephemeral where the message only the user can see
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 interaction button pages
Type: ?Boolean.label
The label of this interaction button pages
Type: ?Array < string >.emoji
The emoji of this interaction button pages
Type: ?Array < string >.color
The color of this interaction button pages
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 interaction button pages.
Paramenter | Type | Description |
---|---|---|
embed |
The embed of discord.js MessageEmbed. |
.setEphemeral(ephemeral)
Set ephemeral of this interaction button pages.
Paramenter | Type | Default | Description |
---|---|---|---|
ephemeral |
false
|
If you set it to true, Only the user command can see it! |
.setDuration(time)
Set duration of this interaction button pages.
Paramenter | Type | Default | Description |
---|---|---|---|
time |
30000
|
The duration when bot will stop the embed pages / interaction. |
.setCountPage(count)
Set count pages of this interaction button pages.
Paramenter | Type | Default | Description |
---|---|---|---|
count |
true
|
The count pages of this InteractionButtonPages. |
.setLabelButton([previous, stop, next])
Set label of this interaction button pages.
.setEmojiButton([previous, stop, next])
Set emoji of this interaction button pages.
.setColorButton([previous, stop, next])
Set color of this interaction button pages.
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 InteractionButtonPages to a plain object.