diff options
| author | 2018-09-26 18:27:17 +0100 | |
|---|---|---|
| committer | 2018-09-26 18:27:17 +0100 | |
| commit | 51a52e2b0e54031cce5876f54d1d48c268b5441c (patch) | |
| tree | a4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/check_mode.py | |
| parent | Also use docstrings to check if a command has help available, allow one-string (diff) | |
| signature | ||
Switch to using @Utils.hook and docstrings for event hooks
Diffstat (limited to 'modules/check_mode.py')
| -rw-r--r-- | modules/check_mode.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/check_mode.py b/modules/check_mode.py index 788f573c..2d0298b6 100644 --- a/modules/check_mode.py +++ b/modules/check_mode.py @@ -1,10 +1,7 @@ +from src import ModuleManager, Utils - -class Module(object): - def __init__(self, bot, events, exports): - self.bot = bot - events.on("preprocess.command").hook(self.preprocess_command) - +class Module(ModuleManager.BaseModule): + @Utils.hook("preprocess.command") def preprocess_command(self, event): if event["is_channel"] and event["hook"].kwargs.get( "require_mode"): |
