npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

discord-pages.js

v1.1.1

Published

Simple JavaScript module for paginating Discord Embeds and handling buttons

Readme

CodeQL

Simple JavaScript module for paginating discord embeds and handling corresponding buttons

NOTICES

This module is in BETA RELEASE If you notice any bugs, please open an issue on the repository.

Reporting Issues

Before reporting any issues or suggesting features please visit our Issue Templates to better understand what we consider great issues.

Contributing

We are always interested in contributions! You can see how to contribute here

Example

const { Paginator, Page } = require("discord-pages.js");

// Create paginator instance, tell it how many contents per page we want and how many pages 
const paginator = new Paginator({
  perPage: 5,
  contentType: "MULTIPLE"
});

// Extension of MessageEmbed from discord.js has all the same features as MessageEmbed but with
// Array functionality of addComponents from MessageActionRow in discord.js
paginator.addPages(
  new Page()
    .setTitle("Hello World!")
    .setColor("DEFAULT"),
  new Page()
    .setTitle("Hello Space!")
    .setColor("GOLD")
);

// the array of data to be broken up and placed on the different pages.
paginator.setContents(["1", "2", "3", "4", "5", "6"]);

// Starts the Paginator and sends it to discord (buttons handled within module); 
// sendable = interaction, channel, or member object to send pages to.

// For channel:
await paginator.start(channel, user);

// For interaction:
await paginator.start(interaction, user);

// for User
await paginator.start(user)

The user Parameter in .start(sendable, user); is important for restricting buttons to the specified user. user parameter is only used in sending to a channel or replying to an interaction. It is expected that user will be a APIUser object, NOT Discord Snowflake.

If user parameter is omitted, the paginator buttons will be available to all users with access to the channel the message or interaction is posted to.