aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2020-07-12 17:17:58 -0700
committerGravatar GitHub <[email protected]>2020-07-12 17:17:58 -0700
commit240d64e485eb90da0081597bea615676ae1f3bac (patch)
tree2334e1d910b90201fe03959d8f1b8798ff7e8bb2 /bot
parentFixed importing and context argument annotation. (diff)
Update bot/exts/evergreen/status_cats.py
Co-authored-by: manusaurio <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/evergreen/status_cats.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/evergreen/status_cats.py b/bot/exts/evergreen/status_cats.py
index 900f0ad6..18777e0b 100644
--- a/bot/exts/evergreen/status_cats.py
+++ b/bot/exts/evergreen/status_cats.py
@@ -17,10 +17,11 @@ class StatusCats(commands.Cog):
async def http_cat(self, ctx: commands.Context, code: int) -> None:
"""Sends an embed with an image of a cat, potraying the status code."""
embed = discord.Embed(title=f'**Status: {code}**')
- embed.set_image(url=f'https://http.cat/{code}.jpg')
+
try:
HTTPStatus(code)
+ embed.set_image(url=f'https://http.cat/{code}.jpg')
except ValueError:
embed.set_footer(text='Inputted status code does not exist.')