diff options
| author | 2018-09-26 18:27:17 +0100 | |
|---|---|---|
| committer | 2018-09-26 18:27:17 +0100 | |
| commit | 51a52e2b0e54031cce5876f54d1d48c268b5441c (patch) | |
| tree | a4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/trakt.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/trakt.py')
| -rw-r--r-- | modules/trakt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/trakt.py b/modules/trakt.py index 57f4bce1..81f9f00d 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -8,14 +8,14 @@ URL_TRAKTSLUG = "https://trakt.tv/%s/%s" class Module(object): def __init__(self, bot, events, exports): self.bot = bot - events.on("received.command").on("nowwatching", "nw").hook( - self.now_watching, usage="[username]", - help="Get what you or another user is now watching on trakt.tv") - exports.add("set", {"setting": "trakt", "help": "Set username on trakt.tv"}) + @Utils.hook("received.command.nowwatching|nw", usage="[username]") def now_watching(self, event): + """ + Get what you or another user is now watching on trakt.tv + """ if event["args"]: username = event["args_split"][0] else: |
