Skip to content

Regardless of Eris or Discord.JS, simply paginate your content!

License

Notifications You must be signed in to change notification settings

bckd00r/discord-paginate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Paginate: Regardless of Eris or Discord.JS, simply paginate your content!

A module that will make your job easier while creating paged content

Easily paginate your content, regardless of whether you use Eris or Discord.JS

Please Note:

System currently only supports Eris and DiscordJS. If you are using another module, you can tell us about it or you can contribute by adapting it to the module you use yourself. We are open to all kinds of help :)

Usage

For Eris:

/* Eris packages */
const Eris = require("eris");
const bot = new Eris("BOT_TOKEN");

/* Discord Paginate packages */
const { PaginateContent } = require("discord-paginate");

/* Emitted when bot is ready */
bot.on("ready", () => {
    console.log("Ready!");
});

/* Emitted when someone sends message */
bot.on("messageCreate", async (message) => {

    /* Setting up pages */
    let pages = [
        "this is first page content",
        "this is second page content",
        { embed: { description: "You can also use embeds" } },
        "this is another page"
    ];

    /* Create paginated content */
    let paginated = new PaginateContent.Eris(bot, message, pages);

    /* Initialize paginated content */
    await paginated.init();
});

/* Connect to Discord API */
bot.connect();

For Discord.JS:

/* DiscordJS packages */
const { Client } = require("discord.js");
const client = new Client();

/* Discord Paginate packages */
const { PaginateContent } = require("discord-paginate");

/* Emitted when bot is ready */
client.on("ready", () => {
    console.log("Ready!");
});

/* Emitted when someone sends message */
client.on("message", async (message) => {

    /* Setting up pages */
    let pages = [
        "this is first page content",
        "this is second page content",
        { embed: { description: "You can also use embeds" } },
        "this is another page"
    ];

    /* Create paginated content */
    let paginated = new PaginateContent.DiscordJS(client, message, pages);

    /* Initialize paginated content */
    await paginated.init();
});

/* Connect to Discord API */
client.login("BOT_TOKEN");

\ ゜o゜)ノ

About

Regardless of Eris or Discord.JS, simply paginate your content!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published