Fix cog auto-load
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s
This commit is contained in:
parent
a44556626d
commit
d98d6c6669
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ bot = Client(
|
|||
for module in CONFIG["jimmy"].get("modules", ["cogs/*.py"]):
|
||||
try:
|
||||
bot.load_extension(module)
|
||||
except discord.ExtensionNotFound:
|
||||
except (discord.ExtensionNotFound, ModuleNotFoundError):
|
||||
log.debug("%r does not exist - trying as glob pattern", module)
|
||||
for ext in glob.glob(module, recursive=True):
|
||||
ext = ext.replace("/", ".")[:-3] # foo/bar.py -> foo.bar
|
||||
|
|
Loading…
Reference in a new issue