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/lastfm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/lastfm.py') diff --git a/modules/lastfm.py b/modules/lastfm.py index d46bc50b..ddeefc6b 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -14,11 +14,11 @@ class Module(object): exports.add("set", {"setting": "lastfm", "help": "Set username on last.fm"}) - events.on("received.command").on("np", "listening", "nowplaying" - ).hook(self.np, help="Get the last listened to track from a user", - usage="[username]") - + @Utils.hook("received.command.np|listening|nowplaying", usage="[username]") def np(self, event): + """ + Get the last listened to track from a user + """ if event["args_split"]: lastfm_username = event["args_split"][0] shown_username = lastfm_username -- cgit v1.3.1-10-gc9f91