Skip to content

A Slack integrated help-bot for schools (Chas Academy)

Notifications You must be signed in to change notification settings

chas-academy/drmayday

Repository files navigation

Dr. Mayday

buddy pipeline

A help bot for Chas Academy.

Table of Contents

  1. Getting started
  2. Usage
  3. Standards
  4. Misc
git clone [email protected]:chas-academy/drmayday.git
cd drmayday
npm install

See .env.template for env-variables.

  • Slack token is found under Features -> OAuth & Permissions -> Bot User OAuth Access Token

To start live-compiling ReasonML to Javascript run: npm start then in another terminal run: npm run dev to fire up the Express-server.

CREATE TABLE `help_items` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `room` varchar(255) DEFAULT NULL,
  `time_created` double DEFAULT NULL,
  `time_closed` double DEFAULT NULL,
  `finished` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

The easiest way to get up and running is to use ngrok pointed against the dev-server (eg. ngrok http 4000)

You'll need to change the host-adress at the following locations in the Slack API.

  • actions: Features -> Interactive Components
  • event: Features -> Event Subscriptions
  • mayday (/mayday): Features -> Slash Commands

Available commands

Command Short Privileges Description
clear Teacher Mark all items as finished
help * Display the help text
mayday <Description> m Student Add yourself to the help list
next Teacher Mark help-item as finished
queue q * Show the current queue
remove Student Remove one-self from queue
room Student Change your room-location

To update the changelog and tag a new release we use Standard Version.

Follow these steps:

git checkout master; git pull origin master
npm run release
npm run tag // just a script to run "git push --follow-tags origin master"

Icon used in Slack:

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY