aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/status_codes.py
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-05-25 19:25:25 +0100
committerGravatar Chris <[email protected]>2021-05-25 19:32:43 +0100
commit8b5f4117cceb809c412948976566bcd2ee4a2bfc (patch)
tree7fc7a7c0ea2afe9cbbaadb6635332036e457bbe3 /bot/exts/evergreen/status_codes.py
parentMerge pull request #748 from Shivansh-007/main (diff)
Forward some status dog codes to status cat instead
These status dog codes aren't server-friendly, so we use status cat instead.
Diffstat (limited to 'bot/exts/evergreen/status_codes.py')
-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)