aboutsummaryrefslogtreecommitdiff
path: root/modules/lastfm.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-02 19:54:45 +0100
committerGravatar jesopo2018-09-02 19:54:45 +0100
commit8c6ab17e579cf8f4e510ec324fc98b010ff01cb0 (patch)
treec0437f76bbe9dea31f5f4599450ed5b492eedcd6 /modules/lastfm.py
parentIRCLogging -> Logging (diff)
signature
give an Exports object (actually, ExportsContex object) to each module, to
facilitate things like !set and !channelset without using the events system
Diffstat (limited to 'modules/lastfm.py')
-rw-r--r--modules/lastfm.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/lastfm.py b/modules/lastfm.py
index 328a79a6..80204a3f 100644
--- a/modules/lastfm.py
+++ b/modules/lastfm.py
@@ -5,12 +5,11 @@ import Utils
URL_SCROBBLER = "http://ws.audioscrobbler.com/2.0/"
class Module(object):
- def __init__(self, bot, events):
+ def __init__(self, bot, events, exports):
self.bot = bot
- events.on("postboot").on("configure").on(
- "set").assure_call(setting="lastfm",
- help="Set username on last.fm")
+ exports.add("set", {"setting": "lastfm",
+ "help": "Set username on last.fm"})
events.on("received").on("command").on("np",
"listening", "nowplaying").hook(self.np,