diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 12:55:52 +0100 | |
| commit | 9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/lastfm.py | |
| parent | Merge 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.py | 6 |
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]") |
