diff options
author | 2021-08-31 15:19:11 -0400 | |
---|---|---|
committer | 2021-08-31 15:19:11 -0400 | |
commit | 88e0d819d9e40eb5f163fb68828328756652657c (patch) | |
tree | f8eb9e35d29afbf0193af612ca651a2014a4cede /bot/exts/evergreen/status_codes.py | |
parent | All ranges are inclusive (diff) |
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.
Diffstat (limited to 'bot/exts/evergreen/status_codes.py')
-rw-r--r-- | bot/exts/evergreen/status_codes.py | 4 |
1 files changed, 2 insertions, 2 deletions
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)) ) |