From db35e5eacc668a4019307a3bd1bb04b8f31e4238 Mon Sep 17 00:00:00 2001 From: TizzySaurus Date: Wed, 19 Oct 2022 22:47:54 +0100 Subject: Add `break` statement to loop to make its functionality clearer. --- bot/exts/holidays/easter/egghead_quiz.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bot') diff --git a/bot/exts/holidays/easter/egghead_quiz.py b/bot/exts/holidays/easter/egghead_quiz.py index b8d13e87..d77ebe01 100644 --- a/bot/exts/holidays/easter/egghead_quiz.py +++ b/bot/exts/holidays/easter/egghead_quiz.py @@ -100,6 +100,10 @@ class EggheadQuiz(commands.Cog): async for user in reaction.users(): users.append(user) + # At this point we've added everyone who reacted + # with the correct answer, so stop looping over reactions. + break + mentions = " ".join([ u.mention for u in users if not u.bot ]) -- cgit v1.2.3