diff options
author | 2020-07-12 18:33:45 -0700 | |
---|---|---|
committer | 2020-07-12 18:33:45 -0700 | |
commit | 1631d67e3a4ac11526817a862b1d65222ae753c3 (patch) | |
tree | d4d28071284b23a8ec75655ca21dce01f30a07de | |
parent | Update bot/exts/evergreen/status_cats.py (diff) |
Removed logging, added more explicit error catching..
-rw-r--r-- | bot/exts/evergreen/status_cats.py | 10 |
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: |