mirror of https://github.com/stijndcl/didier
Sync bank interest & daily reminders @ 4 am, as requested by @GyroFalc
parent
968df71f98
commit
eb6fc6513c
|
@ -35,7 +35,7 @@ class Tasks(commands.Cog):
|
||||||
# Don't do it multiple times a day if bot dc's, ...
|
# Don't do it multiple times a day if bot dc's, ...
|
||||||
with open("files/lastTasks.json", "r") as fp:
|
with open("files/lastTasks.json", "r") as fp:
|
||||||
lastTasks = json.load(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()
|
users = currency.getAllRows()
|
||||||
bitcoinPrice = self.getCurrentBitcoinPrice()
|
bitcoinPrice = self.getCurrentBitcoinPrice()
|
||||||
for user in users:
|
for user in users:
|
||||||
|
@ -188,7 +188,7 @@ class Tasks(commands.Cog):
|
||||||
# Don't do it multiple times a day if bot dc's, ...
|
# Don't do it multiple times a day if bot dc's, ...
|
||||||
with open("files/lastTasks.json", "r") as fp:
|
with open("files/lastTasks.json", "r") as fp:
|
||||||
lastTasks = json.load(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()
|
reminders = Reminders()
|
||||||
|
|
||||||
weekday = self.getCurrentWeekday()
|
weekday = self.getCurrentWeekday()
|
||||||
|
|
Loading…
Reference in New Issue