discord-button-page
v6.2.0
Published
An embed pages that use package discord.js and discord-buttons to be easier in making pages
Downloads
3
Maintainers
Readme
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.