# discord-slider

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

Latest version **1.1.6** (published 2021-06-01) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install discord-slider
pnpm add discord-slider
yarn add discord-slider
bun add discord-slider
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2021-06-01 |
| First published | 2021-05-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gaetan20 |
| Maintainers | gaetan20 |
| Keywords | discord-buttons, discord-slider, buttons, discord, slide, discord.js |

## Links

- npm: https://www.npmjs.com/package/discord-slider
- npm.io page: https://npm.io/package/discord-slider

## Dependencies (1)

- [discord-buttons](https://npm.io/package/discord-buttons.md) ^3.0.1

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 1.1.6 (latest) — 2021-06-01
- 1.1.5 — 2021-06-01
- 1.1.4 — 2021-06-01
- 1.1.3 — 2021-05-31
- 1.1.2 — 2021-05-30
- 1.1.1 — 2021-05-30
- 1.1.0 — 2021-05-30
- 1.0.8 — 2021-05-30
- 1.0.7 — 2021-05-30
- 1.0.6 — 2021-05-30
- 1.0.5 — 2021-05-30
- 1.0.4 — 2021-05-30
- 1.0.3 — 2021-05-30
- 1.0.2 — 2021-05-29
- 1.0.1 — 2021-05-29
- … 1 more at https://npm.io/package/discord-slider/versions

## README

<div align="center">
  <p>
    <img src="https://gist.githubusercontent.com/gaetan20/1bebbfc6893e602c0a4bf114b75b50ae/raw/046282162ad7d47f222a7419960705817bb68c2a/logo-discord-slider.svg" alt="discord-slider" />
     <a href="url"><img src="https://s3.gifyu.com/images/ezgif-4-2cbac007a4ac.gif" style="border-radius: 10px 10px 10px 10px;" alt="Gif example"></a>
  </p>
  <br>
</div>

discord-slider is a package that allow you to easily create multipage help commands (for example) with buttons.

## Install
```sh
npm install discord-slider
```
## Setup
```js
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 !

<br />

## Method
```js
channel.createSlider(userID, embedsArray, emojiNext, emojiBack)
```
- If you don't precise any emojiNext and emojiBack, they will be ">>" and "<<".

## Example
```js
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.

<br />

## Contact

[Discord](https://discord.gg/f7FdjUnvFX)

---
_Source: https://npm.io/package/discord-slider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
