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:
parent
6ebd93ea14
commit
82fb640fc1
1 changed files with 30 additions and 29 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue