Giter Club home page Giter Club logo

ga_bot's Introduction

GA-Bot

A general purpose slackbot for queueing TA appointments & taking attendance

Using the slackbot NPM by Richard McDaniel

Based on dianabot by Max R. Peterson

This version written & maintained by Bryan Mytko


Setup

  1. Create a bot on Slack here and invite the bot to your channel.
  2. Rename the file env-vars.sample.js to env-vars.js. Be careful not to add this file to your repository.
  3. Set the bot's key to an environment variable SLACKBOT_KEY in your env-vars.js file.
  4. Set up the datbase by running node db/migrations.js
  5. Run npm start to start the bot. Alternatively, ga_bot implements forever which can be executed with forever start app.js.
  6. Communicate with the bot by typing commands directly to the bot via mention or private message in Slack.
  7. There are permission levels for certain commands. These can be set with environment variables in the env-vars.js file for TA_ID and ADMIN_ID. If you don't know these values, see the command belong to obtain your user id.

Customization

GA-Bot allows for custom interaction via the bot_flavor.js file. Rename the provided custom_bot/bot_flavor.sample.js file. You can override the default messages here by adding data for the specific flavor keys:

  • present Response when a student sends the attendance secret word.
  • already_queued Response when you try to queue again.
  • secret_set Message logged to the server when the secret changes.
  • remove Response for leaving the queue.
  • empty_queue Display message for clearing the queue.
  • attendance_cleared Display message for clearing attendnace.
  • quotes An array of quotes chosen at random when a user queues.
  • greeting Message logged to the server when the bot has connected successfully.

List of commands:

All commands work by mentioning the bot directly, using the @ mention system of Slack. For instance, to use the queue command, you would write: @bot-name q me

  • hello - the bot will greet you back.
  • queue me [message] or q me [message] - add yourself to the queue for help. Optional message parameter lets the TA know what topic you need help with.
  • remove or remove me - remove yourself from the queue
  • status - display the current status of/who is in the queue
  • what is my user id? - the bot will give you your Slack internal user id.
  • <secret word> - send the secret word to be marked as present for attendance.
  • help - displays a list of the commands available to anyone who is not the admin/TA

Commands only available for the TA & Admin:

  • next - removes the first person from the queue and sends a message to alert them that it is their turn. It also displays the new status of the queue.
  • remove [username,[username2...]] - removes specific, by name, from the queue.
  • clear queue - clears the queue.
  • attendance - outputs the current attendance list.
  • clear attendance - clears the current attendance list.

Commands only available for the Admin:

  • set secret <secret word> - sets the secret word for attendance.

Issues

To request a feature, create an issue on the GitHub page

For more info on bots/bot users, check out this page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.