aboutsummaryrefslogtreecommitdiff
path: root/modules/in.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-31 12:55:52 +0100
committerGravatar jesopo2018-08-31 12:55:52 +0100
commit9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch)
treed5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/in.py
parentMerge pull request #7 from dngfx/master (diff)
signature
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/in.py')
-rw-r--r--modules/in.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/in.py b/modules/in.py
index 4f4aef51..2ac6a9bc 100644
--- a/modules/in.py
+++ b/modules/in.py
@@ -5,12 +5,12 @@ SECONDS_MAX = Utils.SECONDS_WEEKS*8
SECONDS_MAX_DESCRIPTION = "8 weeks"
class Module(object):
- def __init__(self, bot):
+ def __init__(self, bot, events):
self.bot = bot
- bot.events.on("received").on("command").on("in").hook(
+ events.on("received").on("command").on("in").hook(
self.in_command, min_args=2,
help="Set a reminder", usage="<time> <message>")
- bot.events.on("timer").on("in").hook(self.timer_due)
+ events.on("timer").on("in").hook(self.timer_due)
def in_command(self, event):
seconds = Utils.from_pretty_time(event["args_split"][0])