npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discord-button-pages-ru

v3.5.2

Published

Переведена на русском!

Downloads

3

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!