6.2.0 • Published 2 years ago
discord-button-page v6.2.0
npm install discord-button-page
Here are examples of using discord-button-page v12.
const { MessageButtonPages } = require("discord-button-page");
const { Client, MessageEmbed } = require("discord.js");
const client = new Client();
require("discord-buttons")(client);
client.on("ready", () => console.log('Discord bot is ready!'));
client.on("message", async (message) => {
if (message.content.toLowerCase() === "!pagebutton") {
const embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("It's a cool pagination!")
const embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Wow its working nice!")
const embedPages = new MessageButtonPages()
.setEmbeds([embed1, embed2]) // Unlimited embed options
.setDuration(60000) // Duration of page when stop
.setLabelButton(["1", "2", "3"]) // Label of the button
embedPages.build(message);
}
});
client.login("YOUR_TOKEN_BOT_DISCORD");
Here are examples of using discord-button-page v13.
const { MessageButtonPages } = require("discord-button-page");
const { Client, MessageEmbed } = require("discord.js");
const client = new Client({ intents: [32767] });
client.on("ready", () => console.log('Discord bot is ready!'));
client.on("messageCreate", async (message) => {
if (message.content.toLowerCase() === "!pagebutton") {
const embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("It's a cool pagination!")
const embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Wow its working nice!")
const embedPages = new MessageButtonPages()
.setEmbeds([embed1, embed2]) // Unlimited embed options
.setDuration(60000) // Duration of page when stop
.setReply(true, { replyMention: false }) // Reply the message!
.setLabelButton(["1", "2", "3"]) // Label of the button
embedPages.build(message);
}
});
client.login("YOUR_TOKEN_BOT_DISCORD");
If you want to use discord button v12, don't forget to add
require("discord-buttons")(client);
- DISCORD SERVER
- GITHUB
- YOUTUBE
- Discord Account -
KingPanda#6669
Copyright © 2022/2023 KingPanda. This project is MIT licensed.
6.1.0
2 years ago
6.0.1
2 years ago
6.2.0
2 years ago
6.0.2
2 years ago
6.0.4
2 years ago
6.1.5
2 years ago
4.0.0
3 years ago
3.5.0
3 years ago
3.0.4
3 years ago
3.0.2
3 years ago
3.2.0
3 years ago
3.0.1
3 years ago
10.0.1
3 years ago
3.0.0
3 years ago
2.0.1
3 years ago
0.1.2
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago
1.0.0
3 years ago