aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-12 18:33:34 +0100
committerGravatar jesopo2018-10-12 18:33:34 +0100
commitc5b07f520ea3536ea3dfa795cee17679797bb2b0 (patch)
tree940dbdbafbce060289034cec20605c88286561f0 /modules
parentCorrect the logic used to find the time until the next lottery (diff)
signature
Add !nextlottery to modules/coins.py
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py6
1 files changed, 6 insertions, 0 deletions
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():