tweak(bot): Don't error from non-existent commands

This commit is contained in:
2026-07-31 13:29:04 +03:00
parent 7aed63f756
commit d334f900f8
+6
View File
@@ -197,3 +197,9 @@ class Bot(commands.Bot):
await self.add_token(row.token, row.refresh_token)
except Exception:
logger.exception(f"Failed to add token for {row}")
async def event_command_error(self, payload: commands.CommandErrorPayload) -> None:
if isinstance(payload.exception, commands.CommandNotFound):
logger.debug(f"Attempt to execute nonexistent command for context {payload.context!r}")
else:
return await super().event_command_error(payload)