From 6eb8b1ba6d9aaaf7df42f3d705149f02b6a1b871 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 27 Sep 2018 12:08:07 +0100 Subject: Move all exports to @Utils.export calls --- modules/lastfm.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'modules/lastfm.py') 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): -- cgit v1.3.1-10-gc9f91