From 51a52e2b0e54031cce5876f54d1d48c268b5441c Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 26 Sep 2018 18:27:17 +0100 Subject: Switch to using @Utils.hook and docstrings for event hooks --- modules/trakt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/trakt.py') 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: -- cgit v1.3.1-10-gc9f91