A trivia bot.
- !trivia - ask a question
- !skip - skip the current question
- !answer or !a - provide an answer
- !score - check the score of the player
- !scores or !score all - check the score of all players
- !h or !hint - take a hint
- In your hubot installation's path:
npm install hubot-trivia-game --save
- edit
external-scripts.json
and addhubot-trivia-game
to the JSON array. - if the file doesn't exist, create it with
["hubot-trivia-game"]
- add a
questions.json
file tores/
folder which you may also need to create
The question database is a file containing a JSON array of questions with the following properties:
{
"answer": "Pizza",
"category": "FOOD",
"question": "Crust, sauce, and toppings!",
"value": "$400"
},
One example of such a question set can be found here.
The file needs to be stored in <hubot_root>/res/questions.json
Some settings can be set via .env
config for your Hubot instance.
# The minimum unique skip requests required before the question is actually skipped.
# This prevents any single person from continually skipping questions alone.
# By default, no minimum.
MIN_SKIP_REQUESTS=0