From 08f19038716dc2dcdeb39110cad0abecdf2fa597 Mon Sep 17 00:00:00 2001 From: nya~ <40436815+neko404notfound@users.noreply.github.com> Date: Thu, 21 Jun 2018 19:25:12 +0100 Subject: [PATCH] Unborked a thing. --- sebimachine/__main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sebimachine/__main__.py b/sebimachine/__main__.py index e1b41b6..d9a117e 100644 --- a/sebimachine/__main__.py +++ b/sebimachine/__main__.py @@ -75,13 +75,11 @@ class SebiMachine(commands.Bot, LoadConfig, Loggable): # Load plugins # Add your cog file name in this list with open(in_here("extensions.txt")) as cog_file: - cogs = cog_file.readlines() + cogs = {f'sebimachine.cogs.{c.strip()}' for c in cog_file.readlines()} for cog in cogs: - # Could this just be replaced with `strip()`? try: - cog = cog.replace("\n", "") - self.load_extension(f"src.cogs.{cog}") + self.load_extension(cog) self.logger.info(f"Loaded: {cog}") except (ModuleNotFoundError, ImportError) as ex: logging.exception(f'Could not load {cog}', exc_info=(type(ex), ex, ex.__traceback__))