aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Vivaan Parashar <[email protected]>2021-06-09 22:15:23 +0530
committerGravatar Vivaan Parashar <[email protected]>2021-06-09 22:15:23 +0530
commite0ec9b4811e5dcb60b4815c0376356697b6f73f3 (patch)
treec6138d808302366dd3acf66c98fb637432941967
parentMerge branch 'main' of https://github.com/python-discord/sir-lancebot into fe... (diff)
Remove unecessary if
-rw-r--r--bot/exts/evergreen/stackoverflow.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/evergreen/stackoverflow.py b/bot/exts/evergreen/stackoverflow.py
index 62179150..30b0a825 100644
--- a/bot/exts/evergreen/stackoverflow.py
+++ b/bot/exts/evergreen/stackoverflow.py
@@ -39,10 +39,9 @@ class Stackoverflow(commands.Cog):
data = await response.json()
else:
logger.error(f'Status code is not 200, it is {response.status}')
- if response.status != 200: # If the status is still not 200 after the 3 tries
- await ctx.send(embed=ERR_EMBED)
- return
- elif not data['items']:
+ await ctx.send(embed=ERR_EMBED)
+ return
+ if not data['items']:
no_search_result = Embed(
title=f"No search results found for {search_query}",
color=Colours.soft_red