aboutsummaryrefslogtreecommitdiff
path: root/commands/daily.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/daily.js')
-rw-r--r--commands/daily.js11
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 = {