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/ids.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/ids.py') diff --git a/modules/ids.py b/modules/ids.py index c8bd8042..0c8ba0bf 100644 --- a/modules/ids.py +++ b/modules/ids.py @@ -2,10 +2,10 @@ class Module(object): _name = "IDs" - def __init__(self, bot): - bot.events.on("received.command.myid").hook(self.my_id, + def __init__(self, bot, events): + events.on("received.command.myid").hook(self.my_id, help="Show your user ID") - bot.events.on("received.command.channelid").hook( + events.on("received.command.channelid").hook( self.channel_id, channel_only=True, help="Show the current channel's ID") -- cgit v1.3.1-10-gc9f91