From 8a963b5288c8e5a407dc00f581948d285fa09839 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 13 Dec 2019 16:26:51 +0000 Subject: [PATCH] cron events no longer have timers --- modules/coins.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/coins.py b/modules/coins.py index 7e16e633..823d77f4 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -436,7 +436,7 @@ def roulette(self, event): @utils.hook("cron") @utils.kwarg("schedule", "0 *") - def _interest(self, timer): + def _interest(self, event): for server in self.bot.servers.values(): if not server.get_setting("coin-interest", False): continue @@ -451,7 +451,6 @@ def _interest(self, timer): interest = round(coins*interest_rate, 2) server.set_user_setting(nickname, "coins", self._coin_str(coins+interest)) - timer.redo() @utils.hook("received.command.lotterybuy", authenticated=True) def lottery_buy(self, event): @@ -536,7 +535,7 @@ def lottery_winner(self, event): @utils.hook("cron") @utils.kwarg("schedule", "0 */6") - def _lottery(self, timer): + def _lottery(self, event): for server in self.bot.servers.values(): lottery = server.get_setting("lottery", {}) if lottery: @@ -557,4 +556,3 @@ def _lottery(self, timer): server.set_setting("lottery-winner", user.nickname) user.send_notice("You won %s in the lottery! you now have %s coins" % (self._coin_str(winnings), self._coin_str(new_coins))) - timer.redo()