I am trying to convert from saving to a .json file to .db. but ive been coming into a issue that I can’t seen to fix or find an answer to anywhere. The command is simple, !add @ but I get this error “.add() data is not a number.” Here the short code for this command…
const Discord = require("discord.js");
const db = require("quick.db");
exports.run = async (bot, message, args) => {
let user = message.mentions.members.first() || message.author;
if (isNaN(args[1])) return;
parseInt(`money_${message.guild.id}_${user.id}`, args[1])
db.add(`money_${message.guild.id}_${user.id}`, args[1])
let bal = await db.fetch(`money_${message.guild.id}_${user.id}`)
let moneyEmbed = new Discord.RichEmbed()
.setColor("#FFFFFF")
.setDescription(`Added ${args[1]} coins\n\nNew Balance: ${bal}`);
message.channel.send(moneyEmbed)
};
module.exports.help = {
name:"add"
}