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

swift.eco

v2.0.0

Published

A simple, easy and powerful package meant for easy use of economy for discord bots!

Downloads

1

Readme

Installation

npm i swift.eco

About

A simple, easy and powerful package meant for easy use of economy for discord bots!

Features

  • Now supports the latest version of Quick.DB
  • Global Economy
  • Built-in cooldown
  • Easily customizable
  • & much more

Setup

const Eco = require('swift.eco');
const eco = new Eco.Manager();

Advanced Setup

// recommended to use Discord.JS V14, head over to https://discord.js.org/ for more info!
const Discord = require('discord.js');
const client = new Discord.Client({ intents: new Discord.Intents(32767) })

const Eco = require('swift.eco');
const eco = new Eco.Manager();

client.on('ready', () => {
  console.log(`${client.user.tag} is up and ready!`)
  client.user.setActivity('!help', { type: 'PLAYING' })
})

client.on('messageCreate', message => {
  if(message.content === '!balance' || message.content === '!bal') {
    let wallet = eco.fetchMoney(message.author.id);
    let bank = eco.fetchBank(message.author.id);

    const embed = new Discord.MessageEmbed()
     .setTitle(`${message.author.username}'s Balance`)
     .setDescription(`**Wallet**: ${wallet.amount}\n**Bank**: ${bank.amount}`)
     .setColor('RED')
    message.channel.send({embeds:[embed]})
  }
  if(message.content === '!daily') {
    let dailyamt = Math.floor(Math.random() * 20000) + 10000;
    let daily = eco.daily(message.author.id, dailyamt);

    if (daily.onCooldown) return message.channel.send(`You already claimed your daily coins. Come back after ${daily.time.hours} hours, ${daily.time.minutes} minutes & ${daily.time.seconds} seconds!`);
    else return message.channel.send(`You've claimed ${daily.amount} as your daily coins and now you have total ${daily.after} coins!`);
  };
});

client.login('YOUR BOT TOKEN');

Functions

addMoney(userid, amount); // Add money & return object
fetchMoney(userid); // Return object
fetchBank(userid); // Return object
setMoney(userid, amount); // Set new money valuw & return object
deleteUser(userid); // Delete a user from the database
removeMoney(userid, amount); // Remove a certain amount of money from the user
daily(userid, amount); // Add daily amount and return object with cooldown
weekly(userid, amount); // Add weekly amount and return object with cooldown
work(userid, amount, { options }); // Work function, returns object | options: { cooldown: time_in_ms, jobs: ["job name", "another job"] }
beg(userid, amount, { options }); // Beg function, returns object | options: { canLose: false, cooldown: time_in_ms } | [ can be used in "search" command ]
fish(userid, amount, { options }); // Fish function, returns object | options: { canLose: false, cooldown: time_in_ms }
hunt(userid, amount, { options }); // Hunt function, returns object | options: { canLose: false, cooldown: time_in_ms }
dig(userid, amount, { options }); // Dig function, returns object | options: { canLose: false, cooldown: time_in_ms }
crime(userid, amount, { options }); // Crime function, returns object | options: { canLose: false, cooldown: time_in_ms }
postmeme(userid, amount, { options }); // Postmeme function, returns object | options: { canLose: false, cooldown: time_in_ms }
transfer(userid1, userid2, amount); // Transfer balance from a user to another, returns object
rob(userid1, userid2, amount); // Rob someone's balance, returns object
search(userid, amount, { options }); // Search function, returns object | options: { cooldown: time_in_ms, places: ["Uber", "Sewer"] }
leaderboard({ options }); // Returns leaderboard | options: { raw: false, limit: 10 }

Support

For support or issues or queries, message me on discord at Magicals#5931!