From fd08e23bd46d209a0c8bae84c83ad901a4b9cc12 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 5 Feb 2019 16:56:21 +0000 Subject: [PATCH] Move scripts module to it's own directory --- modules/{scripts.py => scripts/__init__.py} | 3 ++- modules/scripts/{ => scripts}/.keep | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename modules/{scripts.py => scripts/__init__.py} (94%) rename modules/scripts/{ => scripts}/.keep (100%) diff --git a/modules/scripts.py b/modules/scripts/__init__.py similarity index 94% rename from modules/scripts.py rename to modules/scripts/__init__.py index 5b87767d..6eec46b9 100644 --- a/modules/scripts.py +++ b/modules/scripts/__init__.py @@ -4,7 +4,8 @@ from src import IRCObject, ModuleManager, utils class Module(ModuleManager.BaseModule): def on_load(self): - self._directory = os.path.join(self.bot.directory, "modules", "scripts") + our_directory = os.path.abspath(os.path.dirname(__file__)) + self._directory = os.path.join(our_directory, "scripts") self._hooks = [] self._load_scripts() diff --git a/modules/scripts/.keep b/modules/scripts/scripts/.keep similarity index 100% rename from modules/scripts/.keep rename to modules/scripts/scripts/.keep