This commit is contained in:
2025-03-22 12:18:32 +01:00
parent e5efa444ce
commit 71a5cf2391
+3 -2
View File
@@ -72,12 +72,13 @@ async def on_message(message):
if message.author.id in trivia_data["replies"]:
return
# Check answer
if message.content.lower().startswith(trivia_data["correct_answer"].lower()):
await message.add_reaction("✅")
else:
await message.add_reaction("❌")
trivia_data["replies"].append(message.author.id)
# If we've reached max replies, remove this question from tracking
if len(trivia_data["replies"]) >= trivia_data["max_replies"]:
del active_trivia[message.reference.message_id]
@@ -105,7 +106,7 @@ async def send_trivia():
# Store this question in our tracking dict
active_trivia[msg.id] = {
"correct_answer": str(decoded_data['correct_answer']).lower(),
"replies": 0,
"replies": [],
"max_replies": 40
}
print(f"{datetime.now(timezone.utc).strftime('%H:%M:%S')} - Added trivia question ID {msg.id}")