Implement Rock Paper Scissors command for Discord bot#338
Conversation
|
Here's the code health analysis summary for commits Analysis Summary
|
🚀 Deploy this PR to an environmentYou can deploy this PR to either development or staging environment:
Alternatively, you can:
|
Co-authored-by: Pierre-Demessence <1756398+Pierre-Demessence@users.noreply.github.com>
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
There was a problem hiding this comment.
Pull Request Overview
Implements a new /rps slash command that allows Discord users to challenge each other to interactive Rock Paper Scissors games with real-time status updates and automatic timeout handling.
- Adds complete Rock Paper Scissors game system with challenge creation, choice handling, and result determination
- Implements thread-safe game state management using ConcurrentDictionary and Discord button interactions
- Includes comprehensive validation, error handling, and automatic 5-minute game expiration
Adds a new
/rpsslash command that allows users to challenge each other to Rock Paper Scissors games, similar to the existing/duelcommand.Features
/rps @usercreates a challenge with Rock 🪨, Paper 📄, and Scissors ✂️ buttonsImplementation Details
The implementation follows the existing duel command pattern in
UserSlashModule.cs:ConcurrentDictionaryfor thread-safe game state managementGame Flow
/rps @opponentto create a challengeCode Quality
Fixes #337.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.