0.1.0 • Published 4 years ago

ez-paginator v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago