Explorar el Código

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

tags/v2.1.1^2
Roxie Gibson hace 5 años
padre
commit
2fa93e84de
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      roxbot/cogs/trivia.py

+ 1
- 1
roxbot/cogs/trivia.py Ver fichero

@@ -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)

Cargando…
Cancelar
Guardar