aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dennis Pham <[email protected]>2021-05-25 15:00:12 -0400
committerGravatar GitHub <[email protected]>2021-05-25 15:00:12 -0400
commite2dfa1b5ea79e97adc7644966ff982caefdff2e7 (patch)
tree7fc7a7c0ea2afe9cbbaadb6635332036e457bbe3
parentMerge pull request #748 from Shivansh-007/main (diff)
parentForward some status dog codes to status cat instead (diff)
Merge pull request #757 from python-discord/block-some-status-dog-codes
Forward some status dog codes to status cat instead
-rw-r--r--bot/exts/evergreen/status_codes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/evergreen/status_codes.py
index 089bdb4a..181c71ce 100644
--- a/bot/exts/evergreen/status_codes.py
+++ b/bot/exts/evergreen/status_codes.py
@@ -52,6 +52,11 @@ class HTTPStatusCodes(commands.Cog):
@http_status_group.command(name="dog")
async def http_dog(self, ctx: commands.Context, code: int) -> None:
"""Sends an embed with an image of a dog, portraying the status code."""
+ # These codes aren't server-friendly.
+ if code in (304, 422):
+ await self.http_cat(ctx, code)
+ return
+
embed = discord.Embed(title=f"**Status: {code}**")
url = HTTP_DOG_URL.format(code=code)