added game classes and fixed the 'infinite work' issue

This commit is contained in:
ION606
2022-06-26 08:26:01 +03:00
parent 29e42c745e
commit f122f84a0c
+1 -1
View File
@@ -224,7 +224,7 @@ function work(dbo, message, xp_list) {
let date = fulldate.getDate(); let date = fulldate.getDate();
dbo.find({"lastdayworked": {$exists: true}}).toArray(function(err, doc) { dbo.find({"lastdayworked": {$exists: true}}).toArray(function(err, doc) {
if (!String(doc)) { return message.reply("Your account doesn't exist, please contact the mods for support"); } if (!String(doc)) { return message.reply("Your account doesn't exist, please contact the mods for support"); }
if (doc[0].lastdayworked == 111111) {//date if (doc[0].lastdayworked == date) {//date
message.reply("You've already worked today, try again tomorrow!"); message.reply("You've already worked today, try again tomorrow!");
} else { } else {
//Amount to be paid //Amount to be paid