4 Commits

3 changed files with 8 additions and 2 deletions
+6
View File
@@ -197,3 +197,9 @@ class Bot(commands.Bot):
await self.add_token(row.token, row.refresh_token) await self.add_token(row.token, row.refresh_token)
except Exception: except Exception:
logger.exception(f"Failed to add token for {row}") 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)