diff options
| author | 2018-09-27 12:08:07 +0100 | |
|---|---|---|
| committer | 2018-09-27 12:08:07 +0100 | |
| commit | 6eb8b1ba6d9aaaf7df42f3d705149f02b6a1b871 (patch) | |
| tree | ece91b1c4d871d5d2b9a3f6319598e33aa13f93f /modules/lastfm.py | |
| parent | Use ModuleManager.BaseModule in more modules (diff) | |
Move all exports to @Utils.export calls
Diffstat (limited to 'modules/lastfm.py')
| -rw-r--r-- | modules/lastfm.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/lastfm.py b/modules/lastfm.py index ddeefc6b..d02abd6f 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -1,18 +1,13 @@ #--require-config lastfm-api-key from datetime import datetime, timezone -from src import Utils +from src import ModuleManager, Utils URL_SCROBBLER = "http://ws.audioscrobbler.com/2.0/" -class Module(object): +@Utils.export("set", {"setting": "lastfm", "help": "Set last.fm username"}) +class Module(ModuleManager.BaseModule): _name = "last.fm" - def __init__(self, bot, events, exports): - self.bot = bot - self.events = events - - exports.add("set", {"setting": "lastfm", - "help": "Set username on last.fm"}) @Utils.hook("received.command.np|listening|nowplaying", usage="[username]") def np(self, event): |
