diff --git a/data/UserData/544902183007813652/badges/active b/data/UserData/544902183007813652/badges/active index 70d3c2d..6231312 100644 --- a/data/UserData/544902183007813652/badges/active +++ b/data/UserData/544902183007813652/badges/active @@ -1,2 +1,2 @@ 0 -428 \ No newline at end of file +435 \ No newline at end of file diff --git a/data/UserData/544902183007813652/badges/lastActve b/data/UserData/544902183007813652/badges/lastActve index c4d3994..ab6ca7f 100644 --- a/data/UserData/544902183007813652/badges/lastActve +++ b/data/UserData/544902183007813652/badges/lastActve @@ -1 +1 @@ -11 26 1 \ No newline at end of file +11 26 2 \ No newline at end of file diff --git a/data/UserData/544902183007813652/integers/exp b/data/UserData/544902183007813652/integers/exp index e6b7b62..4d4eca2 100644 --- a/data/UserData/544902183007813652/integers/exp +++ b/data/UserData/544902183007813652/integers/exp @@ -1 +1 @@ -2.7 \ No newline at end of file +9.000000000000002 \ No newline at end of file diff --git a/data/UserData/544902183007813652/integers/money b/data/UserData/544902183007813652/integers/money index 8c7b65e..2d0ce9f 100644 --- a/data/UserData/544902183007813652/integers/money +++ b/data/UserData/544902183007813652/integers/money @@ -1 +1 @@ -1014 \ No newline at end of file +1131 \ No newline at end of file diff --git a/src/calculateUserData.js b/src/calculateUserData.js index c8b6e9a..ed2c070 100644 --- a/src/calculateUserData.js +++ b/src/calculateUserData.js @@ -86,11 +86,18 @@ InputMassive[0] = CurrentDate.getMonth() let lastActiveLvl = Number(fs.readFileSync('./data/UserData/' + msg.author.id + '/tasks/lastActve', "utf8")); let activeDays = [0,2,4,7,10,14,18,21,25,31,45,60,90] +let rewards = [0,50,100,150,200,400,500,550,600,1000,700,1000,5000] if (InputMassive[2] >= activeDays[lastActiveLvl]) { + let Money2 = fs.readFileSync('./data/UserData/' + msg.author.id + '/integers/money', "utf8"); + Money2 = Number(Money2) + rewards[lastActiveLvl] +fs.writeFileSync('./data/UserData/' + msg.author.id + '/integers/money', Money2.toString(), 'utf8') + + lastActiveLvl = lastActiveLvl + 1 fs.writeFileSync('./data/UserData/' + msg.author.id + '/tasks/lastActve', lastActiveLvl.toString(), 'utf8') - msg.reply(':tada: **__Поздравляю!__**\nВы получили новый ' + lastActiveLvl + ' уровень в категории "Ежедневный актив"') + msg.reply(':tada: **__Поздравляю!__**\nВы получили новый ' + lastActiveLvl + ' уровень в категории "Ежедневный актив"\nПолучено монет: ' + rewards[lastActiveLvl-1]) + }