Skip to content

Commit

Permalink
Fix extension loader
Browse files Browse the repository at this point in the history
  • Loading branch information
JedHazaymeh committed Dec 5, 2023
1 parent 051c842 commit 59c3ba1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@

# Load custom extensions

extensions = [Path(f).stem for f in glob.iglob("extensions/[!_]*.py")]
extensions = [Path(f).stem for f in glob.iglob("src/extensions/*.py")]

for extension in extensions:
try:
client.load_extension(extension)
client.load_extension(f"extensions.{extension}")
logger.info(f"Loaded extension: {extension}")
except discord.errors.ExtensionLoadException as e:
logger.exception(f"Failed to load extension: {extension}", exc_info=e)
Expand All @@ -51,4 +51,4 @@ async def on_startup():
logger.info(f"Logged in as {client.user}")

logger.info("Starting client...")
client.start()
client.start()

0 comments on commit 59c3ba1

Please sign in to comment.