Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chakany/paginationembed
An Easy and Stylish way of doing Discord Embed Pagination
https://github.com/chakany/paginationembed
discord discordjs discordjs-v13 embed embedpagination hacktoberfest pagination
Last synced: about 9 hours ago
JSON representation
An Easy and Stylish way of doing Discord Embed Pagination
- Host: GitHub
- URL: https://github.com/chakany/paginationembed
- Owner: chakany
- License: mit
- Created: 2021-09-14T12:33:04.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T15:11:17.000Z (almost 2 years ago)
- Last Synced: 2024-09-20T04:19:22.189Z (5 days ago)
- Topics: discord, discordjs, discordjs-v13, embed, embedpagination, hacktoberfest, pagination
- Language: TypeScript
- Homepage:
- Size: 1.05 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# paginationembed
An Easy and Stylish way of doing Discord Embed Pagination
[![CI](https://github.com/jacany/paginationembed/actions/workflows/ci.yml/badge.svg)](https://github.com/jacany/paginationembed/actions/workflows/ci.yml)
---
## Usage
```js
const { EmbedBuilder } = require("discord.js");
const { MessagePagination } = require("@jacany/paginationembed");const array = ["Element 1", "Element 2", "Element 3"];
const embed = new MessagePagination({
embed: new EmbedBuilder(),
itemsPerPage: 2,
startPage: 1,
title: "Values",
timeout: 300000, // Milliseconds before expiry
message: Message, // Pass your Message Object
array,
callbackfn: (value, index) => `**${index + 1}.** ${value}`,
});embed.build();
```### Output
![Screenshot_20210917_142849](https://user-images.githubusercontent.com/30955604/133836832-501a6380-683f-4731-91a4-04c57a8f68d9.png)
## Installing
With NPM:
```sh
npm install @jacany/paginationembed
```or Yarn:
```sh
yarn add @jacany/paginationembed
```