From e185d2278a07aa42714eaf47153abfaffc2e2cd8 Mon Sep 17 00:00:00 2001 From: Alee Date: Sun, 24 Jun 2018 09:35:34 -0400 Subject: Fixes the daily command and added the pay command --- commands/balance.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'commands/balance.js') diff --git a/commands/balance.js b/commands/balance.js index fe3b9f8..e0b87e5 100644 --- a/commands/balance.js +++ b/commands/balance.js @@ -25,7 +25,10 @@ module.exports.run = async (client, message) => { let balance = await db.fetch(`userBalance_${user.id}`); - if (balance === null) balance = 0; + if (balance === null) { + db.set(`userBalance_${message.author.id}`, 0); + balance = 0; + } const embed = new RichEmbed() .setDescription(`**AleeCorp Bank**`) .addField('Account Holder: ', user.username, true) -- cgit v1.2.3