https://github.com/yincrash/hubot-trivia-game
Trivia plugin for Hubot
https://github.com/yincrash/hubot-trivia-game
Last synced: 3 months ago
JSON representation
Trivia plugin for Hubot
- Host: GitHub
- URL: https://github.com/yincrash/hubot-trivia-game
- Owner: yincrash
- License: mit
- Created: 2014-10-20T00:32:48.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T17:01:22.000Z (10 months ago)
- Last Synced: 2024-08-10T20:00:04.176Z (6 months ago)
- Language: TypeScript
- Size: 40 KB
- Stars: 5
- Watchers: 3
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hubot Trivia Game Plugin
A trivia bot.
## Commands
* **!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## Installation
* In your hubot installation's path:
* `npm install hubot-trivia-game --save`
* edit `external-scripts.json` and add `hubot-trivia-game` to the JSON array.
* if the file doesn't exist, create it with `["hubot-trivia-game"]`
* add a `questions.json` file to `res/` folder which you may also need to create### Question DB
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](http://www.reddit.com/r/datasets/comments/1uyd0t/200000_jeopardy_questions_in_a_json_file).The file needs to be stored in `/res/questions.json`
## Settings
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
```