Last active
August 26, 2021 16:04
-
-
Save victorbnl/a51c5cc1da146b5e705b6915f1080971 to your computer and use it in GitHub Desktop.
Load all cogs of cogs folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
for f in os.listdir("cogs"): | |
if re.match(r".*\.py.swp", f): | |
pass | |
elif re.match(r".*\.py", f): | |
bot.load_extension("cogs." + f.replace(".py", "")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment