Discord Bot for managing teacher assistant lab schedule. COVID-19 forced us to push all of our lab hours for questions to an online service.
- To use you'll have to register a bot on Discord's website.
Here's a good tutorial on setting that up.
Following that tutorial, get the bot's token.
-
Fork and clone this repository to your computer.
-
Create a file called .env within the src folder.
Enter the following into the .env:
discordToken=YOUR_TOKEN_HERE
Replacing YOUR_TOKEN_HERE withour bot's token.
-
Make sure you're running a Mongo Database on your computer. You can edit src/scripts/setup.js and run it to add some shifts by default.
-
After that follow the tutorial to invite your bot to your server.
-
Run either of these two commands within src to start the bot up.
$ npm run start
or
$ node index.js
Your bot should be live and listening for commands.
- Students
- TA's
/taschedule
Displays if a TA is currently scheduled to help.
Shows if a currently scheduled TA canceled their shifts.
If none are available at the time, shows how long until next TA is scheduled.
/gettas
Displays list of TA's names.
/gethours <name>
name | type | description |
---|---|---|
name | string |
Lower or Uppercase First name |
Displays a TA's scheduled shifts and any cancelations
/gethours andrew
/cancel <name> <day> <start>
name | type | description |
---|---|---|
name | string |
Lower or Uppercase First name |
day | string |
Lowercase name of day. |
start | number |
Starting hour. (24H Format) |
Marks a scheduled shift as canceled.
Resets for next week to uncanceled as soon as the shift has expired.
/cancel andrew tuesday 15
/uncancel <name> <day> <start>
name | type | description |
---|---|---|
name | string |
Lower or Uppercase First name |
day | string |
Lowercase name of day. |
start | number |
Starting hour. (24H Format) |
Marks a canceled scheduled shift as not canceled.
/uncancel andrew tuesday 15
/reset <name>
name | type | description |
---|---|---|
name | string |
Lower or Uppercase First name |
Deletes all of a TA's shifts.
/reset andrew
/addshift <name> <day> <starthour> <endhour>
name | type | description |
---|---|---|
name | string |
Lower or Uppercase First name |
day | string |
Lowercase name of day. |
starthour | number |
Starting hour. (24H Format) |
endhour | number |
Ending hour. (24H Format) |
Adds a shift for a TA.
/addshift andrew tuesday 15 17