This repository is a group project for CSS360. The team is using this repository to set up collaboration tools and infrastructure for a Discord bot project. The bot simulates a fully interactive multiplayer game of Mafia with automated phase management, role logic, and persistent stat tracking.
- Group repository and individual forks created
- GitHub Projects (Kanban board) set up
- Discord deployment server created
- Discord test servers created
- Project is currently in the planning and setup phase
- Team Name: MOASA
- Members:
- Mini
- Oliver
- Alexandra
- Sari
- Ayad
Sprint 1 focused on setting up a working Discord bot and implementing initial features.
Completed features include:
- Welcome message with a meme when a new user joins the server
- Initial setup for the Mafia game
- Defined Mafia game rules
- /join command for players to join a game
- Direct messages sent to players when enough users have joined
Sprint 2 focused on completing the core Mafia game functionality while improving interactivity, visual feedback, and overall game stability and fairness.
Completed features include:
- Implemented a real-time countdown timer during the Night phase
- Implemented a real-time countdown timer during the voting phase
- Added role-specific visuals for Doctor saves and voting actions
- Prevented duplicate Night phase images on reset
- Added phase-specific images for Night, Morning, Kill, Win, and Lose states
- Integrated role-specific images into the /role command
Game Integrity & Fair Play Enhancements:
- Prevented
/joinfrom resetting or interfering with an active match - Added centralized
gameRunningstate tracking - Dead players can no longer send messages during active gameplay
- Dead players receive a private notification if they attempt to speak
- Night victims receive a private DM revealing the Mafia member responsible
This project is part of CSS360 and is under active development. The README will be updated as the project design becomes clearer.
/joinJoin the Mafia game (starts recruitment if no game is active)/roleView your Mafia role (private)/vote <user>Vote to eliminate a player (Day phase only)/kill <user>Mafia: eliminate a player (Night phase only)/save <user>Doctor: protect a player (Night phase only)/mycommandsList commands for your role/resetReset the Mafia game (admin only)/mafia roleView all roles in the Mafia game/rulesView the rules of the Mafia game/statsShow player stats across all games and recent games
/memeGet a meme
The bot uses a centralized game state system to ensure match integrity.
Key protections include:
- Active game locking to prevent mid-match resets
- Phase tracking (Pre-Game, Night, Day, Ended)
- Alive player tracking to enforce communication restrictions
- Automatic cleanup and state reset after win conditions
These systems ensure a stable multiplayer experience and prevent state corruption during gameplay.
The bot tracks lifetime player stats across matches and stores them persistently in:
- data/stats.json
Recent games are recorded using per-game snapshots so /stats can show what happened in the last matches.
Note:
- The data/ folder is runtime output and should not be committed to git. Add
data/to .gitignore.