diff options
| author | 2018-09-02 19:54:45 +0100 | |
|---|---|---|
| committer | 2018-09-02 19:54:45 +0100 | |
| commit | 8c6ab17e579cf8f4e510ec324fc98b010ff01cb0 (patch) | |
| tree | c0437f76bbe9dea31f5f4599450ed5b492eedcd6 /modules/trakt.py | |
| parent | IRCLogging -> 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/trakt.py')
| -rw-r--r-- | modules/trakt.py | 6 |
1 files changed, 3 insertions, 3 deletions
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"]: |
