aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Objectivitix <[email protected]>2021-05-09 16:31:32 -0400
committerGravatar GitHub <[email protected]>2021-05-09 16:31:32 -0400
commit961e3f788ce4d99782418ec9bc4d33998af42124 (patch)
treee9ac6c3fcffc94d7e5749665b66deae4ff687a50
parentuse random.sample for more concise expression on line 66 (diff)
use dict.get for retrieving a default value instead of a condition
Co-authored-by: ToxicKidz <[email protected]>
-rw-r--r--bot/exts/evergreen/trivia_quiz.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py
index 620a4377..6f39d9f2 100644
--- a/bot/exts/evergreen/trivia_quiz.py
+++ b/bot/exts/evergreen/trivia_quiz.py
@@ -557,10 +557,7 @@ class TriviaQuiz(commands.Cog):
question_dict: dict,
) -> None:
"""Send the correct answer of a question to the game channel."""
- if "info" in question_dict:
- info = question_dict["info"]
- else:
- info = ""
+ info = question_dict.get("info", "")
embed = discord.Embed(
color=discord.Colour.red(),