def on_command_error(self, exception, ctx): if isinstance(exception, CommandNotFound): if await self.database.has(ctx.invoked_with): return else: print(exception.args[0])