Memebers: Will Sarmiento, David Hochberg, Jayden Elishaw, Arteen Ramezani, Khoa Vo, Kieran Moynihan
NOTE: Some issues with slash commands on discord app, so a possible fix is the use of testing in the web browser for discord!
Memebers need to fork this project and then clone this Repo to start!
We thought of a couple of ideas such as:
Gambling bot (Blackjack, Complex slots, Roullette, Poker)
Trivia bot (Music, Common Knowledge, Movies/Shows)
Game bot (Wordle, Uno/Card Games, Connect 4)
These are only a few but so far we are leaning towards a mix of the game/gambling bot!
We have chosen the:
Music trivia bot!
Now We are in the part of finding our requirements and functions!
Requirements:
- Trivia of selected genres of music
- Points
- Leaderboard
- Added the bot trivia command:
- When called the bot shows a preview which will contain a description and
difficulties to pick from. Underneath the preview there are interactable
buttons with difficulties the user can choose from which for now just displays
music questions with multiple choice answers also as buttons. If the answer
is correct, based on respective difficulty, the bot will "give" 1, 2, or 3 points
to the user (tracking the points is a work in progress). If wrong, gives no points.
Additionally after the user picks an answer, there is a display for Correct or
Wrong which also shows the Question, Correct Answer, User's Answer, and
the name of the question was answered by.
- Added logging for all implemented features
/triviacommand now handles song previews, guessing, and multiple-choice questions tied to the currently playing iTunes track. The old/gamecommand has been removed.- Logs to terminal for debugging voice/HTTP/command execution
-Run these once to set up environment (installs new discordJS version and FFMPEG)
sudo apt-get update
sudo apt-get install -y ffmpeg
npm i discord.js@^14
npm i -D @discordjs/rest discord-api-types
- Source files live under
src/ npm run buildruns esbuild:- Bundles/transpiles JS
- Outputs CommonJS modules into
build/ - Preserves folder structure via
--outbase=src
npm startruns:- build
node -r dotenv/config build/app.js
- Explanation of the rules
- Basic genre feature that allows user to select the genre of the song
- Added a score tracker and a command to see the current score
- Enforced 15‑second answer window after each preview; unanswered rounds end
automatically.
- Tested skip functionality but chose to remove.
- Added hint feature, needs to still be cleaned up.
- Modified replay button; limited to one use per song and restarts the timer.
- Added a hint button (one use per round) that does not affect the timer.
- After each round ends there is a 5‑second pause before the next preview begins.
- Difficulty selection descriptions updated to match question types:
easy=artist/genre, medium=album/title, hard=year.
- Fixed crash caused by overly long button IDs by using numeric indices.
- Questions are all relevant to the song being played
- Ensured a round only moves on after the previous round is over
- Cleaned up Gameplay loop
- Multiple-choice questions now strictly respect the selected difficulty;
easy rounds only ask about artist/genre, medium about album/title, hard
about release year. This prevents irrelevant answer options.
- Hints are generated based on the actual question type instead of always
showing artist/title initials; the API now supports `track`,`artist`,`genre`,
`album`, and `year` hints.
- Added `/terminate` slash command (admin only) which immediately ends a
running trivia game and announces the termination to the channel.
- Added tests covering the new hint logic, and difficulty constraints.
- Updated normalization utility used in tests to collapse extra whitespace.
- /terminate now requires admin permission + stops timers/collectors instantly
- Added a full regression suite
(Details in v2.0.1 release)
- Added tracking of player stats including rounds played/won and games played/won
- Players can use /stats to check their stats
- Admins can use /getstats <user> to check that user's stats
- Changed the name of the /getscore command to /leaderboard
- The new /getscore is now an admin command to get the score of any player
- Added a powerup double points
- Documented the trivia.js file
- Removed outdated functions and files