123
This commit is contained in:
parent
12c75a76ed
commit
82dd6070ad
@ -17,14 +17,18 @@ async def load_all_cogs(bot: commands.Bot, skip_cogs: Optional[List[str]] = None
|
||||
print(f"Skipping cogs: {skip_cogs}")
|
||||
|
||||
for filename in os.listdir(cogs_dir):
|
||||
if filename.endswith(".py") and not filename.startswith("__") and not filename.startswith("gurt") and not filename.startswith("profile_updater"):
|
||||
if filename.endswith(".py") and \
|
||||
not filename.startswith("__") and \
|
||||
not filename.startswith("gurt") and \
|
||||
not filename.startswith("profile_updater") and \
|
||||
not filename.endswith("_base_cog.py"): # Skip base cogs
|
||||
# Special check for welcome_cog.py
|
||||
if filename == "welcome_cog.py":
|
||||
print(f"Found welcome_cog.py, attempting to load it...")
|
||||
|
||||
cog_name = f"{cogs_dir}.{filename[:-3]}"
|
||||
if cog_name in skip_cogs:
|
||||
print(f"Skipping AI cog: {cog_name}")
|
||||
print(f"Skipping specified cog: {cog_name}")
|
||||
continue
|
||||
try:
|
||||
await bot.load_extension(cog_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user