aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/evergreen/status_cats.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/evergreen/status_cats.py b/bot/exts/evergreen/status_cats.py
index e1758514..586b8378 100644
--- a/bot/exts/evergreen/status_cats.py
+++ b/bot/exts/evergreen/status_cats.py
@@ -1,11 +1,8 @@
-import logging
from http import HTTPStatus
import discord
from discord.ext import commands
-log = logging.getLogger(__name__)
-
class StatusCats(commands.Cog):
"""Commands that give HTTP statuses described and visualized by cats."""
@@ -20,12 +17,15 @@ class StatusCats(commands.Cog):
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.')
- await ctx.send(embed=embed)
+ else:
+ embed.set_image(url=f'https://http.cat/{code}.jpg')
+
+ finally:
+ await ctx.send(embed=embed)
def setup(bot: commands.Bot) -> None: