diff options
author | 2021-05-09 16:48:47 -0400 | |
---|---|---|
committer | 2021-05-09 16:48:47 -0400 | |
commit | af709306d716d2d1c19c288cec08a3fa74a20a5c (patch) | |
tree | bab456f8e52bc7326f0053b1809171e19639cb50 /bot | |
parent | remove redundant `description` kwarg pass (diff) |
use walrus so dict lookup is only performed once
Co-authored-by: ToxicKidz <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/evergreen/trivia_quiz.py | 4 |
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. |