From b7cf524e9869828ff85954cb731f7fee98bee8d9 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 31 Aug 2018 12:55:52 +0100 Subject: Give modules event objects with "context"s, to facilitate purging all the event hooks for a module --- modules/seen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/seen.py') diff --git a/modules/seen.py b/modules/seen.py index 750b06e4..222d30b5 100644 --- a/modules/seen.py +++ b/modules/seen.py @@ -2,10 +2,10 @@ import time import Utils class Module(object): - def __init__(self, bot): - bot.events.on("received").on("message").on("channel" + def __init__(self, bot, events): + events.on("received").on("message").on("channel" ).hook(self.channel_message) - bot.events.on("received").on("command").on("seen").hook( + events.on("received").on("command").on("seen").hook( self.seen, min_args=1, help="Find out when a user was last seen", usage="") -- cgit v1.3.1-10-gc9f91