pagekeeper

1.1.21 • Public • Published

🎉Pagekeeper

Pagekeeper is a fully customizable pager system for Discord messages! This can be useful for things like help commands, music bots, and more. It was built with discord.js. I'd suggest not using this for older versions, but you are free to try. For any help, visit my discord!

🎨 Installation

npm i pagekeeper or npm install pagekeeper

📚 Example

const { Client, MessageEmbed } = require("discord.js");
const { pager } = require("pagekeeper"); // Requiring the package!

const client = new Client();
      
client.on("message", message => {
    if (message.content === "!pages") {
        const embedOne = new MessageEmbed()
            .setColor("RANDOM")
            .setTitle("Embed One");

        const embedTwo = new MessageEmbed()
            .setColor("RANDOM")
            .setTitle("Embed Two");

        const pages = [
            embedOne,
            embedTwo
        ]; // Inputting our pages!

        const emojis = [
            "🔄",
            "◀️", 
            "▶️", 
            "⏸️"
        ]; // Inputting our emojis! (these are the defaults, they're customizable)

        pager(message, pages, emojis); // This will start the process!
    };
});

📌 Explanations:

  • The method is whatever you use for your message property.
    • "message"
    • "msg"
  • The pages are the embeds or messages you are going to handle.
  • The emojis are the reactions for the pages. These will be used to flip the pages!
    • [1] First page
    • [2] Next page
    • [3] Previous page
    • [4] Ends the pages

Package Sidebar

Install

npm i pagekeeper

Weekly Downloads

0

Version

1.1.21

License

ISC

Unpacked Size

3.83 kB

Total Files

3

Last publish

Collaborators

  • extase