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/trakt.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'modules/trakt.py') diff --git a/modules/trakt.py b/modules/trakt.py index 81f9f00d..a902e9c1 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -1,16 +1,12 @@ #--require-config trakt-api-key -from src import Utils +from src import ModuleManager, Utils URL_TRAKT = "https://api-v2launch.trakt.tv/users/%s/watching" URL_TRAKTSLUG = "https://trakt.tv/%s/%s" -class Module(object): - def __init__(self, bot, events, exports): - self.bot = bot - exports.add("set", {"setting": "trakt", - "help": "Set username on trakt.tv"}) - +@Utils.export("set", {"setting": "trakt", "help": "Set username on trakt.tv"}) +class Module(ModuleManager.BaseModule): @Utils.hook("received.command.nowwatching|nw", usage="[username]") def now_watching(self, event): """ -- cgit v1.3.1-10-gc9f91