diff --git a/.gitignore b/.gitignore index 75fee30..2e957e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules config.json -.env \ No newline at end of file +.env +.sqlite \ No newline at end of file diff --git a/commands/currency/app.js b/commands/currency/app.js index 18dab31..075262e 100644 --- a/commands/currency/app.js +++ b/commands/currency/app.js @@ -104,16 +104,9 @@ module.exports = { } } } else if (command === 'balance') { - //BROKEN PLEASE FIX!!! const target = message.author; - let user = currency.get(target.id); - - //let user = await Users.findOne({ where: { user_id: message.author.id } }); - if (!user) { - const newUser = await Users.create({ user_id: user, balance: 0 }); - currency.set(target.id, newUser); - } else { console.log(user); } - return message.reply(`${target.tag} has \$${currency.getBalance(target)}`); + currency.add(target.id, 0); //Make sure there's something + return message.reply(`${target.tag} has \$${currency.getBalance(target.id)}`); } else if (command === 'inventory') { const target = message.author; const user = await Users.findOne({ where: { user_id: target.id } }); diff --git a/database.sqlite b/database.sqlite index e69de29..029562f 100644 Binary files a/database.sqlite and b/database.sqlite differ