Archived
generated from imcompiling/discord-bot-template
Fix cog loading.
This commit is contained in:
@@ -39,7 +39,7 @@ def main() -> None:
|
|||||||
|
|
||||||
# Get the modules of all cogs whose directory structure is ./cogs/<module_name>
|
# Get the modules of all cogs whose directory structure is ./cogs/<module_name>
|
||||||
for folder in pathlib.Path("cogs").iterdir():
|
for folder in pathlib.Path("cogs").iterdir():
|
||||||
bot.load_extension(f"cogs.{folder}")
|
bot.load_extension(f"cogs.{folder.name}")
|
||||||
|
|
||||||
@bot.listen()
|
@bot.listen()
|
||||||
async def on_ready() -> None:
|
async def on_ready() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user