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 🙏

© 2026 – Pkg Stats / Ryan Hefner

roye.js

v1.4.8

Published

Roye.js aims to help discord bot developers create their bots with ease

Downloads

39

Readme

Newest Feature

convertMs Converts milliseconds to seconds/minutes/hours/days/weeks/years.

How to Use:

const { convertMs } = require('roye.js');
let ms = 30000;
let converted = convertMs(ms);
console.log(converted); // logs 30s;

messageCollector: Makes message collecting easier.

  • multiMsg(message, array, numberOfMsgs, collector, number): - Helps you with multi message collecting.

getRole: You can fetch a role by mentioning, by their name, or by their ID.

getMember: You can fetch a member by mentioning, by their username, or by their user ID.

getChannel: You can fetch a channel by mentioning, by their name, or by their ID.

formatDate: Format/Shorten a date.

promptMessage: Send a verification message.

getRandom - Properties:

  • .number(num1, num2): Get a random number between two numbers.
  • .member(membersObject): Get a random member from the guild.
  • .role(rolesObject): Get a random role in the guild.
  • .channel(channelsObject): Get a random channel in the guild(text);

Command: npm install roye.js

const { Client } = require('discord.js');
// Initialize the Discord.js Client instance
const client = new Client();
const { getMember, getRole, formatDate, promptMessage } = require('roye.js');

// Ready event fires when the Discord.js client is ready.
// Use once so it only fires once.
client.once('ready', () => {
  console.log(`${client.user.username} is online!`);
});

client.on('message', async (message) => {

  if(message.content === "?test"){

    const args = message.content.split(" ");

    if(!args) return message.channel.send("Please specify a user.");

    const member = getMember(message, args.join(" ")); // getRole function is used in the same way.

    if(!member) return message.channel.send("Specified member was not found.");

    const date = formatDate(member.joinedAt);

    message.channel.send("Verification Message").then(async msg => {

          const emoji = await promptMessage(msg, message.author, 30, ["✅", "❌"]);

          if(emoji === "✅"){
          message.channel.send(`Member: ${member}\nJoin Date: ${date}`)
          }else if(emoji === "❌"){
            message.channel.send("User Cancelled Verification.")
          }
        });
     }else if(message.content === "?test2"){
       let array = [
        "This is the prompt message. `Example`; Tell me about yourself. You have 2 minutes till your time expires.",
        "This is the response message. `Example`: what is your age?",
        "This is another response message. `Example`: What are your hobbies?",
        "This is can be the last response message. `Example`: Anything else we should know?"
      ]

      await message.channel.send(array[0]);// sending the prompt message in the array.
      let collected = 0;
      const filter = m => m.author.id === message.author.id;
      const collector = message.channel.createMessageCollector(filter, {time: 60000});
       collector.on('collect', (message) => {
       collected++;
       messageCollector.multiMsg(message, array, 3, collector, collected);
       // message -  the message object.
       // array - the array of messages.
       // 3 - the amount of messages to collect.
       // collector - the message collector.
       // collected - the amount of messages collected counter. THIS SHOULD BE SET TO ZERO.
   });

   collector.on('end', collected => {

     message.channel.send(collected.size + " Messages Collected.")

     });
     }
});

client.login('token');

More Updates Will Be Coming Soon! Keep an eye out!