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

quickgames.js

v1.0.2

Published

Simple package to make a games for ur bot based on ez-games.js

Downloads

2

Readme

quickgames.js

  • Made For Discord bots which use Discord.js
  • If you want to support me join my discord server My Server
  • Make Sure To Install quickmongo/quick.db quick.db quickmongo Before Using Package!
  • Report Bugs, Errors, Problems In Support Server
  • Install with npm i quickgames.js
  • NPM Click Me

Usage 📕

quick.db

  • Speed Game
const Discord = require('discord.js')
const client = new Discord.Client()
const db = require('quick.db')
client.on('ready', () => {
   console.log('im in!')
})


const quickgames = require('quickgames.js');
client.on('message', async message => {
if(!message.guild) return;
if(message.content.toLowerCase().startsWith('speed')) {

let data = await quickgames.speed(message.author.id, message.guild.id, message.author.displayAvatarURL({ format: 'png'}), client.user.username)
 /**
  * user => message.author.id 
  * guild => message.guild.id
  * image => the generated image from api.
  * word => the word that generated from the package
  */
 let embed = new Discord.MessageEmbed()
.setTitle(`You Have 15 Seconds To Type the word`)
.setImage(data.image)
.setFooter(message.guild.name , message.guild.iconURL())
.setTimestamp()
 message.channel.send(embed)
 let author = m => m.author.id === message.author.id;
 let pointcollecter = new Discord.MessageCollector(message.channel, author , { max: 1 , time: 15000 }); 
 pointcollecter.on('collect', async msg => {
     let word = data.word;
     if(msg.content.toLowerCase() === word.toLowerCase()) {
   message.channel.send(`You've Got one Point!`)  
   db.add(`points_${message.author.id}`, 1)
   db.add(`wins_${message.author.id}`, 1)

} else {
   message.channel.send(`Incorrect the right word is ${word.toLowerCase()}`)
   db.add(`loses_${message.author.id}`, 1)
     }
 })
}
})
client.login("token")
  • Split Game
client.on('message', async message => {
if(!message.guild) return;
if(message.content.toLowerCase().startsWith('split')) {
 
let data = await quickgames.split(message.author.id, message.guild.id, message.author.displayAvatarURL({ format: 'png'}), client.user.username)
  /**
   * user => message.author.id 
   * guild => message.guild.id
   * image => the generated image from api.
   * answer => the answer that generated from the package
   * word => the word the generated from the package
   */
  let embed = new Discord.MessageEmbed()
 .setTitle(`You Have 15 Seconds To Type the word`)
 .setImage(data.image)
 .setFooter(message.guild.name , message.guild.iconURL())
 .setTimestamp()
  message.channel.send(embed)
  let author = m => m.author.id === message.author.id;
  let pointcollecter = new Discord.MessageCollector(message.channel, author , { max: 1 , time: 15000 }); 
  pointcollecter.on('collect', async msg => {
      let word = data.answer;
      if(msg.content.toLowerCase() === word.toLowerCase()) {
    message.channel.send(`You've Got one Point!`)  
    db.add(`points_${message.author.id}`, 1)
    db.add(`wins_${message.author.id}`, 1)

} else {
    message.channel.send(`Incorrect the right word is ${word.toLowerCase()}`)
    db.add(`loses_${message.author.id}`, 1)
      }
  })
}
})
  • Get User Points
client.on('message',  async message => {
  if(message.content.toLowerCase().startsWith('points')) {
   if(!message.guild) return;
   let data = await quickgames.points(message.author.id)
   /**
    * total => user points  
    * wins => user wins
    * loses => user loses
    */
   message.channel.send(`Total Points: ${data.total}`)
  }
})

quickmongo

Speed Game

const Discord = require('discord.js')
const client = new Discord.Client()
const {Database} = require("quickmongo");
const db = new Database("mongo-uri-here") // your mongo uri
client.on('ready', () => {
   console.log('im in!')
})


const {Mongo} = require('quickgames.js');
const quickgames = new Mongo("mongo-uri-here") // your mongo uri
client.on('message', async message => {
if(!message.guild) return;
if(message.content.toLowerCase().startsWith('speed')) {

let data = await quickgames.Mspeed(message.author.id, message.guild.id, message.author.displayAvatarURL({ format: 'png'}), client.user.username)
 /**
  * user => message.author.id 
  * guild => message.guild.id
  * image => the generated image from api.
  * word => the word that generated from the package
  */
 let embed = new Discord.MessageEmbed()
.setTitle(`You Have 15 Seconds To Type the word`)
.setImage(data.image)
.setFooter(message.guild.name , message.guild.iconURL())
.setTimestamp()
 message.channel.send(embed)
 let author = m => m.author.id === message.author.id;
 let pointcollecter = new Discord.MessageCollector(message.channel, author , { max: 1 , time: 15000 }); 
 pointcollecter.on('collect', async msg => {
     let word = data.word;
     if(msg.content.toLowerCase() === word.toLowerCase()) {
   message.channel.send(`You've Got one Point!`)  
   db.add(`points_${message.author.id}`, 1)
   db.add(`wins_${message.author.id}`, 1)

} else {
   message.channel.send(`Incorrect the right word is ${word.toLowerCase()}`)
   db.add(`loses_${message.author.id}`, 1)
     }
 })
}
})
client.login("token")
  • Split Game
client.on('message', async message => {
if(!message.guild) return;
if(message.content.toLowerCase().startsWith('split')) {
 
let data = await quickgames.Msplit(message.author.id, message.guild.id, message.author.displayAvatarURL({ format: 'png'}), client.user.username)
  /**
   * user => message.author.id 
   * guild => message.guild.id
   * image => the generated image from api.
   * answer => the answer that generated from the package
   * word => the word that generated from the package
   */
  let embed = new Discord.MessageEmbed()
 .setTitle(`You Have 15 Seconds To Type the word`)
 .setImage(data.image)
 .setFooter(message.guild.name , message.guild.iconURL())
 .setTimestamp()
  message.channel.send(embed)
  let author = m => m.author.id === message.author.id;
  let pointcollecter = new Discord.MessageCollector(message.channel, author , { max: 1 , time: 15000 }); 
  pointcollecter.on('collect', async msg => {
      let word = data.answer;
      if(msg.content.toLowerCase() === word.toLowerCase()) {
    message.channel.send(`You've Got one Point!`)  
    db.add(`points_${message.author.id}`, 1)
    db.add(`wins_${message.author.id}`, 1)

} else {
    message.channel.send(`Incorrect the right word is ${word.toLowerCase()}`)
    db.add(`loses_${message.author.id}`, 1)
      }
  })
}
})
  • Get User Points
client.on('message',  async message => {
  if(message.content.toLowerCase().startsWith('points')) {
   if(!message.guild) return;
   let data = await quickgames.Mpoints(message.author.id)
   /**
    * total => user points  
    * wins => user wins
    * loses => user loses
    */
   message.channel.send(`Total Points: ${data.total}`)
  }
})

Why quickgames.js

  • Fast and easy to use
  • Note : This Package Is Using Quick.db QuickMongo (Database)
  • This Package Is Made With 💖 By Mahmoud.#8617