djs-economy
v1.4.0
Published
A Economy Package For Discord.js With Banking And Wallet
Downloads
59
Maintainers
Readme
Latest News!!
↪ New Cash & Bank System! (4/15/21)
Installation
Node.js 12.0.0 or newer is required.
$ npm install --save djs-economy
if your getting python required error please download sequelize & sqlite3 manually then download djs-economy
Table of Contents
Adding Cash/Bank
// [UserID] param1 must be a discord user id
// <amount> param2 must be a number
const djs = require('djs-economy')
djs.AddCash(UserID, Amount) //Add Money To Cash Balance
djs.AddBank(UserID, Amount) //Add Money To Bank Balance
Subtracting Cash/Bank
// [UserID] param1 must be a discord user id
// <amount> param2 must be a number
const djs = require('djs-economy')
djs.SubCash(UserID, Amount) //Subtracts Money From Cash Balance
djs.SubBank(UserID, Amount) //Subtracts Money From Bank Balance
Setting Cash/Bank
// [UserID] param1 must be a discord user id
// <amount> param2 must be a number
const djs = require('djs-economy')
djs.SetCash(UserID, Amount) // Set Money For Cash Balance
djs.SetBank(UserID, Amount) // Set Money For Bank Balance
Getting Cash/Bank
// [UserID] param1 must be a discord user id
// Note! must be in an async function
const djs = require('djs-economy')
const FetchCash = await djs.GetCash(UserID) //Gets Cash Balance
console.log(FetchCash.cash) //Displays Cash Balance
const FetchBank = await djs.GetBank(UserID) //Gets Bank Balance
console.log(FetchBank.bank) //Displays Bank Balance
Deleting Cash/Bank Users
// [UserID] param1 must be a discord user id
const djs = require('djs-economy')
djs.Delete(UserID) //Deletes Users Cash & Bank Balance