Sync bank interest & daily reminders @ 4 am, as requested by @GyroFalc

pull/90/head
Stijn De Clercq 2021-08-30 22:03:31 +02:00
parent 968df71f98
commit eb6fc6513c
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class Tasks(commands.Cog):
# Don't do it multiple times a day if bot dc's, ...
with open("files/lastTasks.json", "r") as fp:
lastTasks = json.load(fp)
if int(self.getCurrentHour()) == 0 and int(time.time()) - int(lastTasks["interest"]) > 10000:
if int(self.getCurrentHour()) == 4 and int(time.time()) - int(lastTasks["interest"]) > 10000:
users = currency.getAllRows()
bitcoinPrice = self.getCurrentBitcoinPrice()
for user in users:
@ -188,7 +188,7 @@ class Tasks(commands.Cog):
# Don't do it multiple times a day if bot dc's, ...
with open("files/lastTasks.json", "r") as fp:
lastTasks = json.load(fp)
if int(self.getCurrentHour()) == 7 and int(time.time()) - int(lastTasks["remind"]) > 10000:
if int(self.getCurrentHour()) == 4 and int(time.time()) - int(lastTasks["remind"]) > 10000:
reminders = Reminders()
weekday = self.getCurrentWeekday()