1.1.6 • Published 3 years ago

discord-slider v1.1.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
3 years ago

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); // must be below your discord.Client()
require('discord-slider')(client); // must be below your discord.Client()

You absolutly need to require both discord-buttons and discord-slider !

Method

channel.createSlider(userID, embedsArray, emojiNext, emojiBack)
  • If you don't precise any emojiNext and emojiBack, they will be ">>" and "<<".

Example

message.channel.createSlider(message.author.id, [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

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago