diff options
| author | Alee <alee14498@gmail.com> | 2018-06-24 09:35:34 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-06-24 09:35:34 -0400 |
| commit | e185d2278a07aa42714eaf47153abfaffc2e2cd8 (patch) | |
| tree | e822491a58d151c5d66ed3e6384d687a8807ab0f /commands/balance.js | |
| parent | d4cf8223b9685a4ca95f95489e11e9ccfe600c36 (diff) | |
| download | AleeBot-e185d2278a07aa42714eaf47153abfaffc2e2cd8.tar.gz AleeBot-e185d2278a07aa42714eaf47153abfaffc2e2cd8.tar.bz2 AleeBot-e185d2278a07aa42714eaf47153abfaffc2e2cd8.zip | |
Fixes the daily command and added the pay command
Diffstat (limited to 'commands/balance.js')
| -rw-r--r-- | commands/balance.js | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
