Socket
Socket
Sign inDemoInstall

ez-paginator

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ez-paginator

Make discord emoji page easy


Version published
Maintainers
1
Install size
13.9 kB
Created

Readme

Source

ezpaginator

JavaScript Style Guide standard-readme compliant

Make discord emoji page easy

Table of Contents

Install

npm install ez-paginator # Use yarn if you prefer to use yarn

Usage

Example:

// Assume that you're using discord.js
// Eris example and this same example are in example folder
const { Client } = require('discord.js');
const EZPaginator = require('../index');

const client = new Client();

client.on('message', async (msg) => {
  if (msg.content.startsWith('> test')) {
    const message = await msg.channel.send('Test');
    const paginator = new EZPaginator({
      client,
      msg: message,
      contents: ['Test', 'Another!']
    });

    paginator.start();
  }
});

client.login('Your Token');

API

Paginator(options)

Paginator, make discord emoji page easy.

Constructor

new Paginator(options)

Constructor

Parameters:
NameTypeDescription
optionsObjectOptions
Properties:
NameTypeDescription
clientObjectDiscord.js or Eris Client
msgObjectMessage Class
contentsArray.<string>Contents
embedsArray.<Object>Embeds (This will overrides contents)
timeoutnumberReaction timeout
reactionsArray.<string>Reactions, first element will move page to prev, and second element will move to next. (If more reactions mode is enabled, first element will move page to first, second and third is same as normal reactions mode, and fourth element will move page to end.)
moreReactionsbooleanEnables more reactions mode

Methods

(async) start()

Start Function

Maintainers

@Helloyunho

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2020 Helloyunho

FAQs

Last updated on 23 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc