From c5b07f520ea3536ea3dfa795cee17679797bb2b0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 12 Oct 2018 18:33:34 +0100 Subject: [PATCH] Add !nextlottery to modules/coins.py --- modules/coins.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/coins.py b/modules/coins.py index 649974cf..1a101c23 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -488,6 +488,12 @@ class Module(ModuleManager.BaseModule): event["stdout"].write("%s: The current jackpot is %s" % ( event["user"].nickname, decimal.Decimal(LOTTERY_BUYIN)*count)) + @utils.hook("received.command.nextlottery") + def next_lottery(self, event): + until = self._until_next_6_hour() + event["stdout"].write("Next lottery is in: %s" % + utils.to_pretty_time(until)) + @utils.hook("timer.coin-lottery") def lottery(self, event): for server in self.bot.servers.values():