Adding setup function that loads the cogs and runs the bot

pull/8/head v0.7.2-beta
sgoudham 4 years ago
parent 927c1bb7a6
commit 3bc76e5c4b

@ -529,7 +529,7 @@ class Bot(commands.Bot):
# --------------------------------------------!End Events Section!----------------------------------------------
def setup(self):
def run_bot(self):
cogs = [path.split("\\")[-1][:-3] for path in glob("./cogs/*.py")]
for ext in cogs:

@ -19,4 +19,5 @@ from bot import Bot
# Initiating Bot Object As Client
client = Bot()
client.setup()
# Run the bot
client.run_bot()

Loading…
Cancel
Save