@itsdiogo912/eco.js
v1.0.2-snapshot
Published
Economy package for Discord bot
Downloads
2
Maintainers
Readme
eco.js
A Simple Package for an Economy system to Discord.js Bots!
NOTE: This Package is still in development, please report any issue or bug on this site
Installation
npm install @itsdiogo912/eco.js
Usage
const Economy = require("@itsdiogo912/eco.js"); //Import Economy package
const eco = new Economy('1000'); //NOTE : 1000 on this line is the default balance
eco.fetchBalance('userID').then(money => { //Fetches balance from an userID
console.log(money); //log the money
});
eco.updateBalance('userID', 5000).then(newBalance => { //note : .then(newBalance => { is optional
console.log(newBalance);
});