1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 21:02:38 +00:00

Fix bot exiting on NotFound errors within on_command_error

This commit is contained in:
Dylan Dizon 2018-11-26 18:53:23 -05:00
parent 6ebd93ea14
commit 82fb640fc1

View file

@ -159,6 +159,7 @@ async def on_error(error, *args, **kwargs):
@bot.event @bot.event
async def on_command_error(ctx, error): async def on_command_error(ctx, error):
with suppress(err.NotFound):
if isinstance(error, errext.CommandOnCooldown): if isinstance(error, errext.CommandOnCooldown):
await ctx.message.add_reaction('\N{HOURGLASS}') await ctx.message.add_reaction('\N{HOURGLASS}')
await asyncio.sleep(error.retry_after) await asyncio.sleep(error.retry_after)