diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 13:44:39 +0100 | |
| commit | b7cf524e9869828ff85954cb731f7fee98bee8d9 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/ids.py | |
| parent | Revert "Reformat" (diff) | |
| signature | ||
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/ids.py')
| -rw-r--r-- | modules/ids.py | 6 |
1 files changed, 3 insertions, 3 deletions
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") |
