Load cogs within cogs/owner

This commit is contained in:
Parker M. 2024-04-03 15:40:56 -05:00
parent b8d7289bb8
commit 63413c44c5
No known key found for this signature in database
GPG Key ID: 95CD2E0C7E329F2A

View File

@ -19,6 +19,9 @@ class MyBot(commands.Bot):
for ext in os.listdir("./code/cogs"): for ext in os.listdir("./code/cogs"):
if ext.endswith(".py"): if ext.endswith(".py"):
await self.load_extension(f"cogs.{ext[:-3]}") await self.load_extension(f"cogs.{ext[:-3]}")
for ext in os.listdir("./code/cogs/owner"):
if ext.endswith(".py"):
await self.load_extension(f"cogs.owner.{ext[:-3]}")
bot = MyBot() bot = MyBot()