diff options
Diffstat (limited to 'modules/lastfm.py')
| -rw-r--r-- | modules/lastfm.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/lastfm.py b/modules/lastfm.py index 77f693c1..7a607dd0 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -7,17 +7,16 @@ URL_SCROBBLER = "http://ws.audioscrobbler.com/2.0/" class Module(object): def __init__(self, bot): self.bot = bot - bot.events.on("boot").on("done").hook(self.boot_done) + + bot.events.on("postboot").on("configure").on( + "set").call(setting="lastfm", + help="Set username on last.fm") + bot.events.on("received").on("command").on("np", "listening", "nowplaying").hook(self.np, help="Get the last listen to track from a user", usage="[username]") - def boot_done(self, event): - self.bot.events.on("postboot").on("configure").on( - "set").call(setting="lastfm", - help="Set username on last.fm") - def np(self, event): if event["args_split"]: username = event["args_split"][0] |
