discord-slider is a package that allow you to easily create multipage help commands (for example) with buttons.
Install
npm install discord-slider
Setup
const discord = require('discord.js');
const client = new discord.Client();
require("discord-buttons")(client);
require('discord-slider')(client);
You absolutly need to require both discord-buttons and discord-role-react !
Example
channel.createSlider(userID, [embed0, embed1, embed2, embed3])
- The order of the embeds in the array will be the order of the pages.
- userID is needed to restrict buttons usage to the user who requested the command.
After 5 minutes, the buttons will become disabled.
Contact
Discord