CyberTA was designed in the COVID-19 pandemic to help Operating Systems TAs with their queue based office hours. The inspiration came from other twitch.tv bots that allowed users to be put in a queue for games. It uses Discord.js and Heroku apps to create a 24/7 bot that monitors multiple text-channels.
!ping
- simple test that responds "pong"!next
- adds a user to queue and responds with user's position in queue, (optional:!next + 'issue description'
),!queue
- view the queue w/ user name, issue description, how long they've been waiting!undo
- quickly undo the next call that put the user in queue!remove
- takes a index paramater (i:e remove 2), removes user from queue at certain index, alerts user that TA is ready, deletes user's !next call!ready
- removes user from top of the queue, alerts user that the TA is ready, deletes !next call from top user, tells time spent on previous team (if available)!online
- enables !next command, sets TA to online!offline
- disables !next command, sets TA to offline!clear
- clears the queue and deletes allnext
messages that were in the queue!help
- provides list of commands and their functions
CyberTA uses the following tech:
- Discord - Based communication software
- Discord.js - chat bot language
- Heroku - used for hosting the bot
These instructions are for installing CyberTA to a Heroku application. You will need a GitHub, Heroku, and discord developer account as well as manage server permissions to a Discord server.
- Fork this repository to your GitHub account, or an account you have access to.
- With Github Student Developer Pack, you will have access to more hour usage credits
- Create a new app, call it whatever you'd like (only you will see this).
- For deployment method, choose Github, search for your fork and connect.
- Once it has connected successfully a new section called "Manual deploy" will appear, deploy master to pull the code from GitHub.
- The Heroku instance will now install dependencies, and you will need to configure the app.
- Goto https://discord.com/developers/applications.
- Create a new application (again, call it whatever you'd like, this is for you).
- Once you have created your app, add a bot and copy the bot token.
- If you'd like to change the username field now, this is what will your bot will be called.
- Go back to your Heroku app settings, under 'Settings', reveal config vars.
- Create a new variable
BOT_TOKEN
and paste your copied token. - On your Discord server right click the channel you wish to designate for the TA's to manage the queue (You may need to hold shift) and click 'Copy ID'.
- This ID will be the
TA_CHANNEL
config var on Heroku. - Do the same for the office hours channel creating a
OFFICE_HOURS
config var with the corresponding ID on Heroku. - To add this Bot to your server, go to https://scarsz.me/authorize. You can find your client Id from the Discord application settings, under 'General Information'.
- Choose the server you'd like to deploy the bot to, and 'Authorize'.
- Back on Heroku, under the 'Resources' section you should now have two Dynos a web and a node worker. Disable the web and enable the node worker.
- This will restart the application and your bot should not be functional.
- Persistent Queue (Heroku does not support persistent file storage, so this may need a database)
MIT