change way error handling errors are handled
@@ -100,6 +100,7 @@ class Events(commands.Cog):
@commands.Cog.listener()
async def on_command_error(self, ctx, e):
+ try:
if isinstance(e, commands.CommandOnCooldown):
if ctx.command.name == 'mine':
if await self.db.fetch_item(ctx.author.id, 'Efficiency I Book') is not None:
@@ -156,6 +157,8 @@ class Events(commands.Cog):
await self.bot.send(ctx, ctx.l.misc.errors.andioop.format(self.d.support))
await self.debug_error(ctx, e)
+ except Exception as e:
+ await self.debug_error(ctx, e)
def setup(bot):
