A NodeJS module using Slack's RTM to create a Slack Quizbot to run quizzes in your Slack channel. There are some quizzes included but you can create your own quiz with the Slack Quizbot Quiz Builder.
Create a folder and install the slackquizbot module at that location:
npm install slackquizbot
Create a myquizbot.js file containing the following, adding in your unique bot token:
var QuizBot = require('slackquizbot');
var myQuizBot = new QuizBot("_YOUR_SLACK_BOT_TOKEN_");
Start your Quizbot:
node myquizbot.js
Make sure your bot is present in the channel you want to run the quiz in. All commands will also work in DMs with your bot so you can test these commands privately.
Ask Quizbot to tell you all the available quizzes
@quizbot list quizzes
Start the general knowledge quiz
@quizbot start quiz general_knowledge
Whenever a question is active Quizbot will search for any matching answers automatically
To pause a quiz for any reason
@quizbot pause quiz
Resume a paused quiz
@quizbot resume quiz
To prematurely stop a quiz
@quizbot stop quiz
To list everyone's current score
@quizbot show scores
You can create your own quizzes using the Slack Quizbot Quiz Builder. Once you've downloaded your JSON file, you can use it by either directly placing the file in a local folder called 'data' or in Slack you can DM the file to your Quizbot.