Skip to content

Add !duel command for typing race duels#169

Merged
11k merged 4 commits into
masterfrom
feat/duel
Mar 22, 2026
Merged

Add !duel command for typing race duels#169
11k merged 4 commits into
masterfrom
feat/duel

Conversation

@11k

@11k 11k commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add !duel [duration] user1 user2 command that starts a typing race between two users. A random phrase is displayed and the first to type it wins; the loser gets muted for the specified duration (default 10m, 30s timeout).
  • Add homoglyph-based anti-cheat: a Unicode lookalike character is injected into the displayed phrase so copy-pasting from chat won't match the ASCII original.
  • Increase phrase length from 3 words to 5 for added difficulty.

Test plan

  • All 192 existing + new tests pass (npm test)
  • ESLint passes on duel.js
  • Manual verification: start a duel, confirm the phrase displays correctly, typing it manually wins, copy-pasting from chat does not match

11k added 4 commits March 22, 2026 13:36
A privileged user picks two users to compete in a typing race. The bot
generates a random 3-word phrase and the first duelist to type it wins.
The loser gets muted (default 10m, configurable via duration prefix).
30-second timeout with no punishment if neither types the phrase.
Inject a random Unicode homoglyph (visually identical Cyrillic character)
into the displayed phrase so copy-pasting from chat won't match the
ASCII original. Manually typed responses remain pure ASCII and match
correctly.
@11k 11k added the enhancement New feature or request label Mar 22, 2026
@11k 11k merged commit c7badaa into master Mar 22, 2026
2 checks passed
@11k 11k deleted the feat/duel branch March 22, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant