File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -352,17 +352,14 @@ async def on_message(self, message):
352352 if message .content .lower ().strip () == answer :
353353 user_progress [user .id ] += 1
354354 await message .channel .send (f"Correct, { user .mention } !" )
355-
356- if user_progress [user .id ] == len (quiz_questions ): # Check if all questions are answered
357- print (f"{ user .mention } has completed the quiz!" )
358- user_progress [user .id ] = 0 # Reset the user's progress
359- print (f"{ user .mention } 's progress has been reset." )
360- else :
361- await ask_question (message .channel , user ) # Ask the next question
362-
355+ await ask_question (message .channel , user ) # Ask the next question
363356 else :
364357 await message .channel .send (f"Incorrect, { user .mention } . Please try again." )
365358 await timeout_user (message , user ) # Apply a timeout for incorrect answers
359+ else :
360+ print (f"{ user .mention } has completed the quiz!" )
361+ user_progress [user .id ] = 0 # Reset the user's progress
362+ print (f"{ user .mention } 's progress has been reset." )
366363
367364 return # Stop further processing if the user is in a quiz
368365
You can’t perform that action at this time.
0 commit comments