From 819f4e0680dc8225355924e87bc71938605b98f7 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 12 Oct 2018 18:07:23 +0100 Subject: Pass context-wrapped timers to each module, add ModuleManager.BaseModule.on_load --- modules/scripts.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/scripts.py') diff --git a/modules/scripts.py b/modules/scripts.py index 0c4ccb25..ae158546 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -1,11 +1,10 @@ import glob, json, os, subprocess -from src import IRCObject, utils +from src import IRCObject, ModuleManager, utils -class Module(object): - def __init__(self, bot, events, exports): - self.events = events - self._directory = os.path.join(bot.directory, "modules", "scripts") +class Module(ModuleManager.BaseModule): + def on_load(self): + self._directory = os.path.join(self.bot.directory, "modules", "scripts") self._hooks = [] self._load_scripts() -- cgit v1.3.1-10-gc9f91