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

discordecoclient

v1.0.4

Published

You need to install quick.db before using this library, using: ```bat npm install --save quick.db ``` Then, require the library, and create the Client, using: ```js const { Main } = require('discordecoclient') const EcoClient = new Main(options: {

Downloads

11

Readme

Discord Economy Client NPM version

Read me before installing!

You need to install quick.db before using this library, using:

npm install --save quick.db

Then, require the library, and create the Client, using:

const { Main } = require('discordecoclient')
const EcoClient = new Main(options: {
    client: client, // Your bot client.
    economymanagers: [], // Array of User IDs
    prefix: "$", // Cash prefix
    consolelogs: true // Should changes to users be logged in the console
})
// or
const DiscordEcoClient = require('discordecoclient')
const EcoClient = new DiscordEcoClient.Main(options: {
    client: client,
    economymanagers: [],
    prefix: "$",
    consolelogs: true
})

EcoClient.AddToBalance(UserID, Amount)

const EcoClient = new Main(options: {
    client: client,
    economymanagers: [],
    prefix: "$",
    consolelogs: true
})
EcoClient.AddToBalance(UserID, Amount)
// Expected Promise result:
// {user_id, oldbalance, newbalance}

EcoClient.RemoveFromBalance(UserID, Amount)

const EcoClient = new Main(options: {
    client: client,
    economymanagers: [],
    prefix: "$",
    consolelogs: true
})
EcoClient.RemoveFromBalance(UserID, Amount)
// Expected Promise result:
// {user_id, oldbalance, newbalance}

EcoClient.Fetch(UserID)

const EcoClient = new Main(options: {
    client: client,
    economymanagers: [],
    prefix: "$",
    consolelogs: true
})
EcoClient.Fetch(UserID)
// Expected Promise result:
// {user_id, balance}

EcoClient.Work(UserID, MinimumPayout, MaximumPayout, Jobs)

const EcoClient = new Main(options: {
    client: client,
    economymanagers: [],
    prefix: "$",
    consolelogs: true
})
EcoClient.Work(UserID, Amount)
// Expected Promise result:
// {user_id, oldbalance, newbalance, job, got}

Example bot (using Eris):

const Eris = require('eris')
const { Main } = require('discordecoclient')
const client = new Eris(token)
const EcoClient = new Main({
  client: client,
  economymanagers: [],
  prefix: "$",
  consolelogs: true
})

client.on('connect', () => {
  console.log("Connected to Discord's servers!")
  EcoClient.emit('discord_connected')
})

const commands = [
  {
    name:"addbal",
    run:async (message, args) => {
     var profile = await EcoClient.AddToBalance(message.author.id, args[0])
     client.createMessage(message.channel.id, `You just added ${EcoClient.options.prefix}${args[0]} to your balance of ${EcoClient.options.prefix}${profile.oldbalance}, and you now have ${EcoClient.options.prefix}${profile.newbalance}.`)
  }
  },
  {
    name: "removebal",
    run:async (message, args) => {
      var profile = await EcoClient.RemoveFromBalance(message.author.id, args[0])
      client.createMessage(message.channel.id, `You just removed ${EcoClient.options.prefix}${args[0]} from your balance of ${EcoClient.options.prefix}${profile.oldbalance}, and you now have ${EcoClient.options.prefix}${profile.newbalance}.`)
    }
  },
  {
    name: "bal",
    run:async (message, args) => {
      var profile = await EcoClient.Fetch(message.author.id)
      client.createMessage(message.channel.id, `You have ${EcoClient.options.prefix}${profile.balance}.`)
    }
  },
  {
    name: "work",
    run: async (message, args) => {
      var profile = await EcoClient.Work(message.author.id, 100, 1000, ["Cashier", "Robber", "Police Officer"])
      client.createMessage(message.channel.id, `You work as a ${profile.job} and got ${EcoClient.options.prefix}${profile.got}! You now have ${profile.newbalance}.`)
    }
  }
]

client.on('messageCreate', (msg) => {
  if (msg.author.bot || !msg.content.startsWith('!' /* Chosen prefix */)) return
  commands.forEach(command => {
    var args = msg.content.split(' ')
    var usercommand = args.shift();
    if (usercommand === command.name) command.run(msg, args)
  })
})