A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
How about a retro game asking questions about retro gaming? If that doesn't fit the theme, I don't know what does.
Trivia bots are part of Internet history, with the earliest incarnations popping about two decades ago on IRC. The concept is simple: A bot asks a question, gives a clue indicating the number of characters per word in the answer (e.g., ******** **** ********) and users try to answer it as quickly as possible by typing out the answer. The first one to answer it correctly from the perspective of the bot wins.
The number of points usually depends on the time it takes the winner to answer the question and, often, there's some kind of hinting system to help the players if they take a long time to answer.
Bot: What was the first Nintendo Entertainment System (NES) game to feature princess Toadstool and Bowser?
Bot: [hint] ***** ***** ***** [100 points remaining]
- some time later -
Bot: [hint] S***r M***o B***. [50 points remaining]
- some time later -
Bot: [hint] S*p*r M*r*o Br*s. [25 points remaining]
- some time later -
Bot: Time's up! The correct answer was `Super Mario Bros.`
Implementation details
[x] Write a trivia quiz that can be started and stopped with a command;
[ ] Make the bot provide intermediate hints if no correct answer has been given yet;
[ ] Award points based on reaction time;
[ ] Start with a clean leader board for each trivia session and print the final leader board at the end;
[ ] Use fuzzywuzzy (fuzzy string matching) to accept answers that are "close enough";
[ ] Provide a way to load in different questions sets from a static resource (note 1);
[ ] Provide a static resource with a "Retro Gaming" questions/answers set (note 2);
Note 1: Since the Trivia Bot is going to live in "Evergreen" (always available), it would be great to have a system to load different sets of questions "on the fly" from a static file. This means we can add different questions/answers later and easily load a specific theme.
Note 2: For now, store the questions/answers in a human-readable static resource in a sensible format. It could be json, csv, or any other format that's easy to work with and easy to modify.
How about a retro game asking questions about retro gaming? If that doesn't fit the theme, I don't know what does.
Trivia bots are part of Internet history, with the earliest incarnations popping about two decades ago on IRC. The concept is simple: A bot asks a question, gives a clue indicating the number of characters per word in the answer (e.g.,
******** **** ********
) and users try to answer it as quickly as possible by typing out the answer. The first one to answer it correctly from the perspective of the bot wins.The number of points usually depends on the time it takes the winner to answer the question and, often, there's some kind of hinting system to help the players if they take a long time to answer.
Implementation details
fuzzywuzzy
(fuzzy string matching) to accept answers that are "close enough";Note 1: Since the Trivia Bot is going to live in "Evergreen" (always available), it would be great to have a system to load different sets of questions "on the fly" from a static file. This means we can add different questions/answers later and easily load a specific theme.
Note 2: For now, store the questions/answers in a human-readable static resource in a sensible format. It could be
json
,csv
, or any other format that's easy to work with and easy to modify.Additional information