aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/stackoverflow.py
diff options
context:
space:
mode:
authorGravatar Vivaan Parashar <[email protected]>2021-05-13 23:47:07 +0530
committerGravatar Vivaan Parashar <[email protected]>2021-05-13 23:50:13 +0530
commitd6066de336708df66e3d071115622a5db54c22b3 (patch)
tree12fc4d3b3b9baaa782c8922b48bf632ee32013e8 /bot/exts/evergreen/stackoverflow.py
parentchange docstring (diff)
change code style
Diffstat (limited to 'bot/exts/evergreen/stackoverflow.py')
-rw-r--r--bot/exts/evergreen/stackoverflow.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/bot/exts/evergreen/stackoverflow.py b/bot/exts/evergreen/stackoverflow.py
index b85a0c97..46577cdd 100644
--- a/bot/exts/evergreen/stackoverflow.py
+++ b/bot/exts/evergreen/stackoverflow.py
@@ -54,18 +54,22 @@ class Stackoverflow(commands.Cog):
return
top5 = data["items"][:5]
- embed = Embed(title=f"Search results for {search_query!r} - Stackoverflow",
- url=SEARCH_URL.format(query=encoded_search_query),
- description=f"Here are the top {len(top5)} results:",
- color=Colours.orange)
+ embed = Embed(
+ title=f"Search results for {search_query!r} - Stackoverflow",
+ url=SEARCH_URL.format(query=encoded_search_query),
+ description=f"Here are the top {len(top5)} results:",
+ color=Colours.orange
+ )
for item in top5:
embed.add_field(
name=f"{unescape(item['title'])}",
- value=(f"[{Emojis.stackoverflow_upvote} {item['score']} "
- f"{Emojis.stackoverflow_views} {item['view_count']} "
- f"{Emojis.stackoverflow_ans} {item['answer_count']} "
- f"{Emojis.stackoverflow_tag} {', '.join(item['tags'][:3])}]"
- f"({item['link']})"),
+ value=(
+ f"[{Emojis.stackoverflow_upvote} {item['score']} "
+ f"{Emojis.stackoverflow_views} {item['view_count']} "
+ f"{Emojis.stackoverflow_ans} {item['answer_count']} "
+ f"{Emojis.stackoverflow_tag} {', '.join(item['tags'][:3])}]"
+ f"({item['link']})"
+ ),
inline=False)
embed.set_footer(text="View the original link for more results.")
try: