Skip to content

Add 10-second preparation countdown to !duel#172

Merged
11k merged 3 commits intomasterfrom
fix/duel-improvements
Mar 23, 2026
Merged

Add 10-second preparation countdown to !duel#172
11k merged 3 commits intomasterfrom
fix/duel-improvements

Conversation

@11k
Copy link
Copy Markdown
Contributor

@11k 11k commented Mar 23, 2026

Summary

  • Adds a 10-second preparation window before the duel phrase is revealed, giving participants time to get ready
  • Removes redundant duel result message that was being sent to chat twice
  • Updates all duel tests to account for the new async countdown flow

Flow

  1. User types !duel user1 user2
  2. Immediate message: "Get ready! The phrase to type will appear in 10 seconds..."
  3. 10 seconds pass
  4. Challenge message with phrase appears: "First to type '...' wins. You have 30 seconds. GO!"
  5. 30-second typing window and resolution (unchanged)

Test plan

  • All 196 tests passing
  • Manually verify preparation message appears immediately
  • Manually verify phrase appears ~10s later
  • Verify 30s typing window works after phrase reveal
  • Verify timeout works (10s prep + 30s typing)
  • Verify concurrent duel rejection works during prep period

11k added 2 commits March 23, 2026 14:21
The mute reason was being sent as a separate chat message after a duel,
resulting in a duplicate announcement. The winner message already
communicates the outcome.
Instead of immediately showing the phrase, the duel now announces a
10-second prep window so participants can get ready. After the countdown,
the phrase is revealed via sendOutputMessage and the 30-second typing
race begins.
@11k 11k added the bug Something isn't working label Mar 23, 2026
@11k 11k merged commit d2d0e2b into master Mar 23, 2026
2 checks passed
@11k 11k deleted the fix/duel-improvements branch March 23, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant