0.0.0 • Published 7 years ago

hubot-quizbot v0.0.0

Weekly downloads
3
License
-
Repository
-
Last release
7 years ago

hubot-quizbot

A hubot script for running a quiz with questions sourced from a simple JSON file.

The repository is set up for use with the hubot-rocketchat docker image but you could just as easily take the contents of the /scripts directory and use it in another hubot environment.

You will need a shared volume with the docker container to store the scores and questions. The scores are persisted as a simple JSON file in the shared volume.

Setup:

Run an npm install in the scripts directory to install dependencies.

You can use dockerlocal.sh to start up a local docker instance, just change the configuration settings in dockerlocal.sh.example.

Environment Variables:

  • QUIZBOT_SCORES_FILE - Location of the scores file within the docker container.
  • QUIZBOT_QUESTIONS_FILE - Location of the questions file within the docker container.
  • QUIZBOT_BANG_COMMANDS - Set to true if you would like to address quizbot using !scores, !ask, rather than 'quizbot scores', 'quizbot ask' and so on.
  • QUIZBOT_FORFEIT_TIME - Time (in seconds) before a question will automatically reveal the answer.