diff --git a/commands/collect-income.js b/commands/collect-income.js index 0dd3143..a1ed70e 100644 --- a/commands/collect-income.js +++ b/commands/collect-income.js @@ -106,9 +106,11 @@ module.exports = { return interaction.send({ embeds: [success] }) } else { - let s = hoursBetweenDates * 60; - let timeTillIncome = client.secondsToDhms(s); - + let date = banking.guilds[GuildDB.serverID].lastIncome; + date.setHours(date.getHours() + GuildDB.incomeLimiter); + diff = (date - now) / 1000; + let timeTillIncome = client.secondsToDhms(diff); + const error = new EmbedBuilder() .setColor(client.config.Colors.Red) .setDescription(`You've already collected your income this week. Wait **${timeTillIncome}** to collect again.`); diff --git a/package.json b/package.json index d4d4d3a..7dc29b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "6.7.9", + "version": "6.7.10", "description": "A General Purpose Discord Bot for DayZ Servers.", "main": "index.js", "nodemonConfig": {