# discord.js-pagination

> A simple utility to paginate discord embeds.

Latest version **1.0.3** (published 2020-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install discord.js-pagination
pnpm add discord.js-pagination
yarn add discord.js-pagination
bun add discord.js-pagination
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-11-11 |
| First published | 2019-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 67.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Author | saanuregh |
| Maintainers | saanuregh |
| Keywords | discord.js, pagination |

## Links

- npm: https://www.npmjs.com/package/discord.js-pagination
- Repository: https://github.com/saanuregh/discord.js-pagination
- Homepage: https://github.com/saanuregh/discord.js-pagination#readme
- Issues: https://github.com/saanuregh/discord.js-pagination/issues
- npm.io page: https://npm.io/package/discord.js-pagination

## Recent versions

- 1.0.3 (latest) — 2020-11-11
- 1.0.2 — 2019-07-17
- 1.0.1 — 2019-07-04

## README

<div align="center">
  <p>
    <a href="https://nodei.co/npm/discord.js-pagination
/"><img src="https://nodei.co/npm/discord.js-pagination.png?downloads=true&stars=true" alt="NPM info" /></a>
  </p>
</div>


# discord.js-pagination
A simple utility to paginate discord embeds. Built on discord.js@^12.0.0 (master) but should work on older versions. Compatible with MessageEmbeds, RichEmbeds (not tested). Pages are embeds.

# Installation
* `npm install discord.js-pagination`

# Usage
__Basic Bot Example__
```js
// Import the discord.js-pagination package
const paginationEmbed = require('discord.js-pagination');

// Use either MessageEmbed or RichEmbed to make pages
// Keep in mind that Embeds should't have their footers set since the pagination method sets page info there
const { MessageEmbed } = require('discord.js');
const embed1 = new MessageEmbed();

// Create an array of embeds
pages = [
	embed1,
	embed2,
	//....
	embedn
];

// Call the paginationEmbed method, first two arguments are required
// emojiList is the pageturners defaults to ['⏪', '⏩']
// timeout is the time till the reaction collectors are active, after this you can't change pages (in ms), defaults to 120000
paginationEmbed(msg, pages, emojiList, timeout);
// There you go, now you have paged embeds
```
# Preview
![Demo](https://raw.githubusercontent.com/saanuregh/discord.js-pagination/master/example/demo.png)
Here is the package used for paging song queue.

---
_Source: https://npm.io/package/discord.js-pagination · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
