diff options
author | 2020-11-30 15:18:01 +0100 | |
---|---|---|
committer | 2020-11-30 15:18:01 +0100 | |
commit | 556f0c5349cd5b4875953154242b863fdee510a2 (patch) | |
tree | a2a13567372ba380bda28ea53435d9a579a1d43b /bot/exts/evergreen/trivia_quiz.py | |
parent | Make prideavatar support specifying the image by URL (diff) | |
parent | Merge pull request #532 from python-discord/sebastiaan/ci/add-core-dev-approv... (diff) |
Merge branch 'master' into prideavatar-url
Diffstat (limited to 'bot/exts/evergreen/trivia_quiz.py')
-rw-r--r-- | bot/exts/evergreen/trivia_quiz.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py index 8dceceac..fe692c2a 100644 --- a/bot/exts/evergreen/trivia_quiz.py +++ b/bot/exts/evergreen/trivia_quiz.py @@ -121,8 +121,10 @@ 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) |