Last commit before doing a major update

main
supopur 2 years ago
parent 0097d0557c
commit dac8c6516f

@ -14,5 +14,5 @@ key = "/path/to/private.key"
[bot]
cogs=["cogs.example", "cogs.web.web"]
cogs=["cogs.example"]
guild_ids=["823188238260633600", "1081319631463133185", "903933566612799579"]

@ -144,14 +144,7 @@ class API:
self.guild_ids = config["bot"]["guild_ids"]
print(type(config["bot"]))
#Load all the extensions
for x in config["bot"]["cogs"]:
log("inf", f"Loading {x}...")
try:
bot.load_extension(x)
except Exception as e:
log("wrn", f"{x} Failed to load skipping... Error: {e}")
log("inf", "Loading all cogs completed.")
@bot.event
@ -177,4 +170,11 @@ if __name__ == "__main__":
api = API(config, bot, log)
bot.api = api
bot.run(token)
#Load all the extensions
for x in config["bot"]["cogs"]:
log("inf", f"Loading {x}...")
try:
bot.api.load(x)
except Exception as e:
log("wrn", f"{x} Failed to load skipping... Error: {e}")
log("inf", "Loading all cogs completed.")

Loading…
Cancel
Save