added try/except when adding cog

This commit is contained in:
phixxy 2024-01-27 21:51:42 -08:00
parent 03c31d5eba
commit 863f5262ab
2 changed files with 10 additions and 2 deletions

View file

@ -47,4 +47,8 @@ class Donate(commands.Cog):
async def setup(bot):
await bot.add_cog(Donate(bot))
try:
await bot.add_cog(Donate(bot))
bot.logger.info("Successfully added Donate Cog")
except:
bot.logger.info("Failed to load Donate Cog")

View file

@ -113,4 +113,8 @@ class Highscores(commands.Cog):
await ctx.send(file=f)
async def setup(bot):
await bot.add_cog(Highscores(bot))
try:
await bot.add_cog(Highscores(bot))
bot.logger.info("Successfully added Highscores Cog")
except:
bot.logger.info("Failed to load Highscores Cog")