aboutsummaryrefslogtreecommitdiff
path: root/modules/lastfm.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-31 12:55:52 +0100
committerGravatar jesopo2018-08-31 12:55:52 +0100
commit9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch)
treed5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/lastfm.py
parentMerge pull request #7 from dngfx/master (diff)
signature
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/lastfm.py')
-rw-r--r--modules/lastfm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/lastfm.py b/modules/lastfm.py
index e8a2545e..328a79a6 100644
--- a/modules/lastfm.py
+++ b/modules/lastfm.py
@@ -5,14 +5,14 @@ import Utils
URL_SCROBBLER = "http://ws.audioscrobbler.com/2.0/"
class Module(object):
- def __init__(self, bot):
+ def __init__(self, bot, events):
self.bot = bot
- bot.events.on("postboot").on("configure").on(
+ events.on("postboot").on("configure").on(
"set").assure_call(setting="lastfm",
help="Set username on last.fm")
- bot.events.on("received").on("command").on("np",
+ events.on("received").on("command").on("np",
"listening", "nowplaying").hook(self.np,
help="Get the last listened to track from a user",
usage="[username]")