diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 13:44:39 +0100 | |
| commit | b7cf524e9869828ff85954cb731f7fee98bee8d9 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/check_mode.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/check_mode.py')
| -rw-r--r-- | modules/check_mode.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/check_mode.py b/modules/check_mode.py index a7a8e788..4fb2b783 100644 --- a/modules/check_mode.py +++ b/modules/check_mode.py @@ -1,10 +1,9 @@ class Module(object): - def __init__(self, bot): + def __init__(self, bot, events): self.bot = bot - bot.events.on("preprocess").on("command").hook( - self.preprocess_command) + events.on("preprocess").on("command").hook(self.preprocess_command) def preprocess_command(self, event): if event["is_channel"] and event["hook"].kwargs.get( |
