aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anubhav1603 <[email protected]>2020-10-11 19:01:25 +0530
committerGravatar Anubhav1603 <[email protected]>2020-10-11 19:01:25 +0530
commit971bb3fe17d34a30cc9492e46d3992735c3cf276 (patch)
tree4108cc908896fa540f0b2fb951138f9126933df4
parentMerge pull request #465 from LakshyaShastri/master (diff)
changed return
-rw-r--r--bot/exts/evergreen/trivia_quiz.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py
index 8dceceac..4dbb1c6a 100644
--- a/bot/exts/evergreen/trivia_quiz.py
+++ b/bot/exts/evergreen/trivia_quiz.py
@@ -121,8 +121,9 @@ class TriviaQuiz(commands.Cog):
# A function to check whether user input is the correct answer(close to the right answer)
def check(m: discord.Message) -> bool:
- ratio = fuzz.ratio(answer.lower(), m.content.lower())
- return ratio > 85 and m.channel == ctx.channel
+ return (
+ m.channel == ctx.channel and fuzz.ratio(answer.lower(), m.content.lower()) > 85
+ )
try:
msg = await self.bot.wait_for('message', check=check, timeout=10)