1.0.2 • Published 6 years ago

discord.js-utility v1.0.2

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

Simple and easy to use utilty tool for discord.js.

$ npm i discord.js-utility
const { paginate, progressbar } = require('discord.js-utility');
const { paginate } = require('discord.js-utility');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client();

client.on('message', message => {
    const embed1 = new MessageEmbed()
        .setDescription('This is the 1st page');
    
    const embed1 = new MessageEmbed()
        .setDescription('This is the 2nd page');

    const pages = [ embed1, embed2 ];
    const emoji = ['⬅', '➡']; // Optional. Defaults to ['⬅', '➡']
    const time = 45000; // Optional. Must be milliseconds. Defaults to 60000

    paginate(message, pages, emoji, time);
});

const { progressbar } = require('discord.js-utility');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client();

client.on('message', message => {
    const value = 10; // The current value
    const maxValue = 100; // The maximum value
    const barSize = 15; // The size of the bar.
    const text = ['▬', '-']; // Optional. The text the bar should show. Defaults to ['▬', '-']
    const showPercentage = false; // Optional. Whether the bar should show percentage or not. Defaults to true;
    const bar = progressbar(value, maxValue, barSize, text, showPercentage);

    return message.channel.send(bar);
});
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago