mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Silenced check failure errors
This commit is contained in:
parent
076dd93904
commit
0e3d0cc954
6
red.py
6
red.py
@ -79,7 +79,7 @@ async def on_command_error(error, ctx):
|
|||||||
elif isinstance(error, commands.BadArgument):
|
elif isinstance(error, commands.BadArgument):
|
||||||
await send_cmd_help(ctx)
|
await send_cmd_help(ctx)
|
||||||
elif isinstance(error, commands.DisabledCommand):
|
elif isinstance(error, commands.DisabledCommand):
|
||||||
await bot.send_message(ctx.message.channel,
|
await bot.send_message(ctx.message.channel,
|
||||||
"That command is disabled.")
|
"That command is disabled.")
|
||||||
elif isinstance(error, commands.CommandInvokeError):
|
elif isinstance(error, commands.CommandInvokeError):
|
||||||
logger.exception("Exception in command '{}'".format(
|
logger.exception("Exception in command '{}'".format(
|
||||||
@ -90,6 +90,8 @@ async def on_command_error(error, ctx):
|
|||||||
await ctx.bot.send_message(ctx.message.channel, inline(oneliner))
|
await ctx.bot.send_message(ctx.message.channel, inline(oneliner))
|
||||||
elif isinstance(error, commands.CommandNotFound):
|
elif isinstance(error, commands.CommandNotFound):
|
||||||
pass
|
pass
|
||||||
|
elif isinstance(error, commands.CheckFailure):
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
logger.exception(type(error).__name__, exc_info=error)
|
logger.exception(type(error).__name__, exc_info=error)
|
||||||
|
|
||||||
@ -404,4 +406,4 @@ if __name__ == '__main__':
|
|||||||
logger.error(traceback.format_exc())
|
logger.error(traceback.format_exc())
|
||||||
loop.run_until_complete(bot.logout())
|
loop.run_until_complete(bot.logout())
|
||||||
finally:
|
finally:
|
||||||
loop.close()
|
loop.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user