Socket
Socket
Sign inDemoInstall

discord-slider

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    discord-slider

Allow you to easily create beautiful page slider for your discord.js bot


Version published
Weekly downloads
34
increased by1600%
Maintainers
1
Install size
74.9 kB
Created
Weekly downloads
 

Readme

Source

discord-slider Gif example


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

Keywords

FAQs

Last updated on 01 Jun 2021

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