From 88e0d819d9e40eb5f163fb68828328756652657c Mon Sep 17 00:00:00 2001 From: brad90four <42116429+brad90four@users.noreply.github.com> Date: Tue, 31 Aug 2021 15:19:11 -0400 Subject: Fix Embed footer text, catch 302 response The unknown error embed was not using the text correctly, using the suggestion from wookie to fix. The "404" response from the dog URL returns 302 instead, changed the elif to check if 302 response is returned. --- bot/exts/evergreen/status_codes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/exts/evergreen/status_codes.py') diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/evergreen/status_codes.py index 54b43304..d6bd4fcc 100644 --- a/bot/exts/evergreen/status_codes.py +++ b/bot/exts/evergreen/status_codes.py @@ -61,7 +61,7 @@ class HTTPStatusCodes(commands.Cog): title=STATUS_TEMPLATE.format(code=code) ).set_image(url=url) ) - elif response.status == 404: + elif response.status in (302, 404): # dog URL returns 302 instead of 404 await ctx.send( embed=discord.Embed( title=ERR_404.format(code=code) @@ -71,7 +71,7 @@ class HTTPStatusCodes(commands.Cog): await ctx.send( embed=discord.Embed( title=STATUS_TEMPLATE.format(code=code) - ).Embed.set_footer(ERR_UNKNOWN.format(code=code)) + ).Embed.set_footer(text=ERR_UNKNOWN.format(code=code)) ) -- cgit v1.2.3