From 8c6ab17e579cf8f4e510ec324fc98b010ff01cb0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 2 Sep 2018 19:54:45 +0100 Subject: give an Exports object (actually, ExportsContex object) to each module, to facilitate things like !set and !channelset without using the events system --- modules/trakt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/trakt.py') diff --git a/modules/trakt.py b/modules/trakt.py index 3f8f2019..8d82896b 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -6,15 +6,15 @@ 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): + def __init__(self, bot, events, exports): self.bot = bot events.on("received").on("command").on("nowwatching", "nw").hook(self.now_watching, help="Get what you or another user is now watching " "on trakt.tv", usage="[username]") - events.on("postboot").on("configure").on("set" - ).assure_call(setting="trakt", help="Set username on trakt.tv") + exports.add("set", {"setting": "trakt", + "help": "Set username on trakt.tv"}) def now_watching(self, event): if event["args"]: -- cgit v1.3.1-10-gc9f91