I am trying to make an economy bot using quick.db
, but for some reason, its .get()
function doesn't get recognised. I have looked into the library's documentation to check if it really does exist and it does.
This is my code that gives the error, it is a simple balance check command.
module.exports = {
name:'withdraw',
execute(message, args){
// pretty much the opposite of the deposit command :P
const Discord = require("discord.js")
const db = require("quick.db")
let bank = db.get(`bank_${message.author}`)
let bal = db.get(`balance_${message.author}`)
let wt = args[1]
db.add(`balance_${message.author}`, wt)
db.subtract(`bank_${message.author}`, wt)
const withdraw = new Discord.MessageEmbed()
.setTitle(`Withdrawal`)
.setDescription(`You have withdrawn ${wt} coins from your bank`)
.setColor("RANDOM")
message.channel.send(withdraw)
},
};