def on_command_error(self, exception, ctx):
if isinstance(exception, CheckFailure):
print("{0} does not have permission to run `{1}`".format(ctx.message.author, ctx.command.name))
elif isinstance(exception, CommandNotFound):
# This is handled in CustomCommands
pass
else:
pprint(exception)
await self.on_error("on_command_error", exception, ctx)
评论列表
文章目录