discord-button-page
TypeScript icon, indicating that this package has built-in type declarations

6.2.0 • Public • Published

discord server npm version npm downloads

A npm that can help you in creating the Embed Discord page by using the Discord Button or Reaction. This npm can be used for DISCORD.JS V12 and V13. But in both versions there are also different ways you can read its documentation here.

📥 | Installation

To install this module type the following command in your console:

npm install discord-button-page

📒 | Documentation

If you want to know more about discord-button-page, You can read the documentation here.

Example

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");

NoteBook:

If you want to use discord button v12, don't forget to add

require("discord-buttons")(client);

| Support Server

Join our Support Server where we help you with issues regarding the module.

📬 | Bug Reports

If you get a bug / error on this NPM, please contact me in Discord with the username KingPanda#6669 or please join the Support Discord to get further improvement.

📎 | Social


📝 | License

Copyright © 2022/2023 KingPanda.
This project is MIT licensed.

/discord-button-page/

    Package Sidebar

    Install

    npm i discord-button-page

    Weekly Downloads

    14

    Version

    6.2.0

    License

    MIT

    Unpacked Size

    86.5 kB

    Total Files

    18

    Last publish

    Collaborators

    • kingpanda-development