diff options
| author | 2021-08-31 12:04:30 -0400 | |
|---|---|---|
| committer | 2021-08-31 12:04:30 -0400 | |
| commit | ef0bdca4f2e3cab4879ca6f094ee505b09b00094 (patch) | |
| tree | 7976b41d0b1c0272c32ee19a1ed3fb9948e9fa14 /bot | |
| parent | Remove unnecessary comma (diff) | |
Add returns after sending embed
This will avoid sending the error embed even when the status codes
are ok.
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/evergreen/status_codes.py | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/evergreen/status_codes.py index f4c6763e..53d7b964 100644 --- a/bot/exts/evergreen/status_codes.py +++ b/bot/exts/evergreen/status_codes.py @@ -37,6 +37,7 @@ class HTTPStatusCodes(commands.Cog):          """Send a cat version of the requested HTTP status code."""          if code in range(100, 599):              await self.build_embed(url=HTTP_CAT_URL.format(code=code), ctx=ctx, code=code) +            return          await ctx.send(              embed=discord.Embed(                  title="Input status code does not exist", @@ -49,6 +50,7 @@ class HTTPStatusCodes(commands.Cog):          """Send a dog version of the requested HTTP status code."""          if code in range(100, 599):              await self.build_embed(url=HTTP_CAT_URL.format(code=code), ctx=ctx, code=code) +            return          await ctx.send(              embed=discord.Embed(                  title="Input status code does not exist",  |