From 26e5d046bb0b5ad3a3b617b852353e93cca32555 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 6 Apr 2025 12:04:56 +0700 Subject: [PATCH] Cogs --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index af27067..4472a99 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import nextcord from nextcord.ext import commands +import os SquogServer = 1356433463854497944 SquogToken = "MTM1NjU2MTY2MjQyOTM2ODQxMQ.G8aypc.CZBX-x6e4Oad3U5zO0nUgc02d9FDIDSNFybysI" @@ -28,7 +29,10 @@ async def help(ctx: nextcord.Message): async def ping(ctx: nextcord.Message): await ctx.reply("Pong!") -client.add_cog("Main") +for filename in os.listdir('./commands'): + if filename.endswith('.py'): + client.load_extension(f'cogs.{filename[:-3]}') + # ______ _