discord-button-page
Version:
An embed pages that use package discord.js and discord-buttons to be easier in making pages
109 lines (83 loc) • 4.27 kB
Markdown
<div align="center">
<p><a href="https://discord-button-page.js.org"><img src="https://cdn.discordapp.com/attachments/865222345072836669/925399050067533834/20211228_214454.png"></a></p>
<p>
<a href="https://discord.gg/p9HHR35mST"><img src="https://img.shields.io/discord/729411185165991995?color=5865F2&logo=discord&logoColor=white" alt="discord server" /></a>
<a href="https://www.npmjs.com/package/discord-button-page"><img src="https://img.shields.io/npm/v/discord-button-page.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/discord-button-page"><img src="https://img.shields.io/npm/dt/discord-button-page.svg?maxAge=3600" alt="npm downloads" /></a>
</p>
<p>A npm that can help you in creating the Embed Discord page by using the Discord Button or Reaction. This npm can be used for <a href="https://npmjs.com/package/discord.js"><strong>DISCORD.JS</strong></a> V12 and V13. But in both versions there are also different ways you can read its documentation <a href="https://discord-button-page.js.org"><strong>here</strong></a>.</p>
</div>
<h2>📥 | Installation</h2>
<p>To install this module type the following command in your console:</p>
```js
npm install discord-button-page
```
<h2>📒 | Documentation</h2>
<p>If you want to know more about discord-button-page, You can read the documentation <a href="https://discord-button-page.js.org"><strong>here</strong></a>.</p>
<h2>Example</h2>
> Here are examples of using discord-button-page v12.
```js
const { MessageButtonPages } = require("discord-button-page");
const { Client, MessageEmbed } = require("discord.js");
const client = new Client();
require("discord-buttons")(client);
client.on("ready", () => console.log('Discord bot is ready!'));
client.on("message", async (message) => {
if (message.content.toLowerCase() === "!pagebutton") {
const embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("It's a cool pagination!")
const embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Wow its working nice!")
const embedPages = new MessageButtonPages()
.setEmbeds([embed1, embed2]) // Unlimited embed options
.setDuration(60000) // Duration of page when stop
.setLabelButton(["1", "2", "3"]) // Label of the button
embedPages.build(message);
}
});
client.login("YOUR_TOKEN_BOT_DISCORD");
```
> Here are examples of using discord-button-page v13.
```js
const { MessageButtonPages } = require("discord-button-page");
const { Client, MessageEmbed } = require("discord.js");
const client = new Client({ intents: [32767] });
client.on("ready", () => console.log('Discord bot is ready!'));
client.on("messageCreate", async (message) => {
if (message.content.toLowerCase() === "!pagebutton") {
const embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("It's a cool pagination!")
const embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Wow its working nice!")
const embedPages = new MessageButtonPages()
.setEmbeds([embed1, embed2]) // Unlimited embed options
.setDuration(60000) // Duration of page when stop
.setReply(true, { replyMention: false }) // Reply the message!
.setLabelButton(["1", "2", "3"]) // Label of the button
embedPages.build(message);
}
});
client.login("YOUR_TOKEN_BOT_DISCORD");
```
<h3>NoteBook:</h3>
> If you want to use discord button v12, don't forget to add
```js
require("discord-buttons")(client);
```
<h2>⭐ | Support Server</h2>
<p>Join our <a href="https://discord.gg/p9HHR35mST">Support Server</a> where we help you with issues regarding the module.</p>
<h2>📬 | Bug Reports</h2>
<p>If you get a bug / error on this NPM, please contact me in Discord with the username KingPanda#6669 or please join the <a href="https://discord.gg/p9HHR35mST"><strong>Support Discord</strong></a> to get further improvement.</p>
<h2>📎 | Social</h2>
- [DISCORD SERVER](https://discord.gg/p9HHR35mST)
- [GITHUB](https://github.com/KingPanda-Development)
- [YOUTUBE](https://www.youtube.com/channel/UCFBGTtH1JkN3bPdHUffyd5A)
- Discord Account - `KingPanda#6669`
<br />
<h2>📝 | License</h2>
> Copyright © 2022/2023 KingPanda.<br />
> This project is MIT licensed.