A slackbot for queueing students for help during TA hours, using the slackbot NPM by Richard McDaniel
- First, if you haven't created a bot user integration, create one here and invite the bot to whatever slack group you would like it to function in.
- Then, create an environmental variable
SLACK_BOT_KEY
that points to the key of the bot generated. - Run
node app.js
, then just mention the bot with commands in any slack group it's a part of. - In order to use commands like
next
andclear queue
, you need to add your slack user ID as an environmental variable.- Once the bot is running and in a channel, mention the bot without any commands.
- This will log the message to your terminal, giving you the user ID of whoever sent the message.
- Copy your user ID and save this to an environmental variable
SLACK_USER_ID
- Restart the bot and you will now be able to use the TA 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
queue me
orq me
- add yourself to the queue for helpremove me
- remove yourself from the queuestatus
- display the current status of/who is in the queuehelp
- displays a list of the commands available to anyone who is not the admin/TA
Commands only available for the admin/TA:
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 queueclear queue
- clears the queue without alerting anyone
Also some easter eggs that may or may not be useful
For more info on bots/bot users, check out this page.