This commit is contained in:
deathbybandaid 2022-02-09 15:41:48 -05:00
parent 8d5ac44fee
commit 87c633aa0e
3 changed files with 8 additions and 9 deletions

View File

@ -14,9 +14,8 @@ class SpiceBotCore_OBJ():
# Allow SpiceBot to interact with Sopel Logger
self.logger = Logger()
# Parse Version Information for the ENV
self.versions = Versions(self.logger)
# Allow Spicebot to mimic Sopel Config
self.config = Config(script_dir)
# def setup(self, script_dir, bot):
# self.bot = bot
# self.config = Config(script_dir, bot)
# Parse Version Information for the ENV
self.versions = Versions(self.config, self.logger)

View File

@ -9,9 +9,8 @@ from sopel.cli.run import build_parser, get_configuration
class Config():
def __init__(self, script_dir, bot):
def __init__(self, script_dir):
self.script_dir = script_dir
self.bot = bot
self.internal = {}

View File

@ -8,7 +8,8 @@ import re
class Versions():
def __init__(self, logger):
def __init__(self, config, logger):
self.config = config
self.logger = logger
self.dict = {}
@ -41,7 +42,7 @@ class Versions():
Register core version items.
"""
version_file = pathlib.Path(self.script_dir).joinpath("version.json")
version_file = pathlib.Path(self.config.script_dir).joinpath("version.json")
with open(version_file, 'r') as jsonversion:
versions = json.load(jsonversion)