Browse Source

fining on cogs import

BaumSplitter41 4 tháng trước cách đây
mục cha
commit
e7017cd577
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      VPD_BOT/main.py

+ 4 - 3
VPD_BOT/main.py

@@ -133,9 +133,10 @@ async def load_extensions():
         return
     for filename in os.listdir(cogs_dir):
         if filename.endswith(".py"):
-            module_name = os.path.splitext(filename)[0]
-            print(module_name)
-            bot.load_extension(f"cogs.{module_name}")
+            cog_list = os.path.splitext(filename)[0]
+            print(cog_list)
+            for cogs in cog_list:
+                bot.load_extension(f"cogs.{cogs}")