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/daily.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/daily.js')
| -rw-r--r-- | commands/daily.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/commands/daily.js b/commands/daily.js index d5db462..0d844a2 100644 --- a/commands/daily.js +++ b/commands/daily.js @@ -21,7 +21,7 @@ const db = require('quick.db'); ms = require('parse-ms'); module.exports.run = async (client, message) => { -/* + let cooldown = 8.64e+7, amount = 100; @@ -34,11 +34,16 @@ module.exports.run = async (client, message) => { } else { message.channel.send(`You have successfully collected $${amount} dollars!`); + let balance = await db.fetch(`userBalance_${message.author.id}`); + + if (balance == null) { + db.set(`userBalance_${message.author.id}`, 0); + } + db.set(`lastDaily_${message.author.id}`, Date.now()); db.add(`userBalance_${message.author.id}`, 100); } -*/ - message.reply('This command is broken for now.'); + }; exports.conf = { |
