aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Objectivitix <[email protected]>2021-05-09 16:48:47 -0400
committerGravatar GitHub <[email protected]>2021-05-09 16:48:47 -0400
commitaf709306d716d2d1c19c288cec08a3fa74a20a5c (patch)
treebab456f8e52bc7326f0053b1809171e19639cb50
parentremove redundant `description` kwarg pass (diff)
use walrus so dict lookup is only performed once
Co-authored-by: ToxicKidz <[email protected]>
-rw-r--r--bot/exts/evergreen/trivia_quiz.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py
index d3def4f2..88c44971 100644
--- a/bot/exts/evergreen/trivia_quiz.py
+++ b/bot/exts/evergreen/trivia_quiz.py
@@ -336,8 +336,8 @@ class TriviaQuiz(commands.Cog):
description=q,
)
- if "img_url" in question_dict:
- embed.set_image(url=question_dict["img_url"])
+ if img_url := question_dict.get("image_url"):
+ embed.set_image(url=img_url)
await ctx.send(embed=embed) # Send question embed.