discord-button-pages-ru
v3.5.2
Published
Переведена на русском!
Downloads
1
Maintainers
Readme
📈 | Status
📁 | Installing NPM
npm i discord-button-page
✍ | Example Button Pages
const config = require("./config.json");
const { MessageButtonPages } = require("discord-button-page");
const { MessageEmbed, Client } = 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 === "?pagebutton") {
let embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("discord-button-page is one cool page with button!")
let embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Go install discord-button-page and try the page with button!")
let embed3 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Enjoy!")
const embedPages = new MessageButtonPages()
.setEmbed([embed1, embed2, embed3]) // Embed Object.
.setChannel(message.channel) // Default = message.channel
.setMessage("Put Some Text Here!", true) // {boolean} True = react emoji when the message success send
.setDuration(30000) // Duration time MS.
.setCountPage() // {boolean} Default = true.
.setEmoji("<Emoji Previous>", "<Emoji Stop>", "<Emoji Next>") // Default foreach emoji = "⬅️", "❌", "➡️".
.setColor("<Color Previous>", "<Color Stop>", "<Color Next>") // Default foreach color = "grey", "red", "grey".
embedPages.buttonPages(message); // This must be async to message.
}
});
client.login(config.token);
✍ | Example Reaction Pages
const config = require("./config.json");
const { MessageReactionPages } = require("discord-button-page");
const { MessageEmbed, Client } = require("discord.js");
const client = new Client();
client.on("ready", () => console.log('Discord bot is ready!'));
client.on("message", async (message) => {
if (message.content.startsWith("?pagereaction")) {
let embed1 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("discord-button-page is one cool page with reaction!")
let embed2 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Go install discord-button-page and try the page with reaction!")
let embed3 = new MessageEmbed()
.setColor("RANDOM")
.setDescription("Enjoy!")
const embedPages = new MessageReactionPages()
.setEmbed([embed1, embed2, embed3]) // Embed Object.
.setDuration(30000) // {number} Duration time MS.
.setCountPage() // {boolean} Default = true.
.setEmoji("<Emoji Previous>", "<Emoji Stop>", "<Emoji Next>") // Default foreach emoji = "⬅️", "❌", "➡️".
.setColor("<Color Previous>", "<Color Stop>", "<Color Next>") // Default foreach color = "grey", "red", "grey".
embedPages.reactionPages(message); // This must be async to message.
}
});
client.login(config.token);
📖 | Documentation Button Pages
- setEmbed([
{string}
]) - Object embed will send! - setChannel(
{string}
) - Options channel -message.channel(default), message.author
. - setMessage(
{string}
,{boolean}
) -{string}
Message/Text,{boolean}
True/False(default) React emoji. NB:This option working on 'setChannel(message.author)'.
- setDuration(
{number}
) -{number}
Number time duration(ms). - setCountPage(
{boolean}
) -{boolean}
True(default)/False Total Page(1/3)
. - setEmoji(
{string}
,{string}
,{string}
) -{string}
Emoji of button default = "⬅️", "❌", "➡️". - setColor(
{string}
,{string}
,{string}
) -{string}
Color of button default ="grey", "red", "grey"
, Color valid ="red", "green", "grey", "blurple"
.
📖 | Documentation Reaction Pages
- setEmbed([
{string}
]) - Object embed will send! - setDuration(
{number}
) -{number}
Number time duration(ms). - setCountPage(
{boolean}
) -{boolean}
True(default)/False Total Page(1/3)
. - setEmoji(
{string}
,{string}
,{string}
) -{string}
Emoji of button default = "⬅️", "❌", "➡️". - setColor(
{string}
,{string}
,{string}
) - {string}
Color of button default ="grey", "red", "grey"
, Color valid ="red", "green", "grey", "blurple"
.
Running Pages
- buttonPages(message) - Run button pages with message!
- reactionPages(message) - Run reaction pages with message!
📎 | Discord Server
- Join our discord support server: Discord
Found problem about this npm come join our discord to report it!