Browse Source

moved bit of code in right place to avoid spamming log with errors.

tags/v2.1.1^2
Roxie Gibson 5 years ago
parent
commit
2fa93e84de
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      roxbot/cogs/trivia.py

+ 1
- 1
roxbot/cogs/trivia.py View File

@@ -290,7 +290,6 @@ class Trivia:

channel = reaction.message.channel
message = reaction.message
user_in_game = bool(user.id in self.games[channel.id]["players"])
try:
reaction_is_on_question = bool(message.id == self.games[channel.id]["current_question"].id)
except AttributeError:
@@ -301,6 +300,7 @@ class Trivia:
reaction_is_on_question = None

if channel.id in self.games:
user_in_game = bool(user.id in self.games[channel.id]["players"])
if user_in_game and reaction_is_on_question:
if reaction.emoji in self.emojis and user.id not in self.games[channel.id]["players_answered"]:
self.games[channel.id]["players_answered"].append(user.id)

Loading…
Cancel
Save