Click Below to Watch Our Video!

Software Engineering Project 2 for CSC 510
Teacher's Pet is a Discord Bot for class instructors to streamline their Discord servers. Discord is a great tool for communication and its functionalities can be enhanced by bots and integrations. There are many tools for organizing classes, but they are often hard to manage. They rarely have good communication mechanisms or ability to connect with other tools. This bot allows instructors to host their classes on Discord, combining communication tools with functionality for assignments, scheduling, and office hours. Instructors and students no longer have to go between platforms to view course details, forums, events, calls, and more.
π !setInstructor command Set a server member to be an instructor (Instructor command)
π !ask command Ask a question
π !answer command Answer a question
π !oh_enter_ command Enter an office hour queue as an individual student
π !oh_enter_group_id command Enter an office hour queue with a group of students
π !oh_exit command Exit the office hour queue
π !oh_next command Go to next student in queue as an instructor (Instructor command)
π !create command Start creating an event (Instructor command)
π !addhw command This command lets the user (either the TAs or professor) to add a homework as a reminder to the discord channel
π !changeduedate command This command lets the user update the due date.
π !clearreminders command This command lets the user delete all the reminders irrespective of courses or homeworks.
π !coursedue command This command lets the user display all the homeworks that are due for a specific course.
π !deletereminder command This command lets the user delete a reminder for a specified coursename and homework.
π !duethisweek command This command lets the user display all the homeworks that are due this week for all the courses.
π !duetoday command This command lets the user display all the homeworks that are due today for all the courses.
π !listreminders command This command lets the user display all the homeworks that are due for all the courses.
π !notify command This command lets the user display all the homeworks that are due this week for all the courses.
π !whois command This command lets the Instructors get information about the member using his/her username.
π !multipoll command This command lets the Instructors create a poll with specified number of choices ( 2 to 10 ).
π !poll command This command lets the Instructors create a poll with 2 choices.
π !take command and π !eventcsv command The eventcsv command lets instructors get a example CSV of all the events in a course. You can download the csv and upload it back to the bot with the take command. This will let you add all the events to the calendar in one go. When using the take command, drag the csv to discord and use the take command in the comment as you upload it.
In addition to the packages from requirements.txt which need to be installed, please have the following installed on your machine:
To install and run Teacher's Pet, follow instructions in the Installation and Testing Guide.
To run tests on the Teacher's Pet, follow instructions in the Installation and Testing Guide.
When Teacher's Pet has been added to a new server as a bot, it will do the following:
- Create a new role called Instructor with Administrative permissions if one does not already exist
- Add the owner of the guild to the Instructor role
- Create a #q-and-a channel if one doesn't already exist
- Create a #course-calendar channel if one doesn't already exist
- Create 4 voice channels for one to one interaction with TAs
- Create 40 voice channels (one for each group) with a limit of maximum 6 participants
In addition to this auto-set up, there is also a command which allows a user with the Instructor role to give the same role to another user. This command will only work for users with the Instructor role already (for example, the guild owner).
The Q&A functionality allow students to ask and answer questions anonymously. The questions are numbered and when answers are sent, they are combined with the question so they can be easily found. Answers are also marked with Student Ans and Instructor Ans to distinguish between the sources.
To ask a question, type !ask "Question" in the #q-and-a channel. Example: !ask "When is the midterm?".

To answer a question type !answer <question_number> "Answer" in the #q-and-a channel. Example: !answer 1 "Oct 12".
Events are items relevant to a class that are time-sensitive. Currently, the types of events include office hours, exams, and assignments. Events in a class are kept track of, and assignments/exams are displayed in a calendar for students and instructors to see.
Events can be created by instructors. Creation of an event can be initiated in the private instructor-commands channel with the !create command. The bot will ask the instructor about various details for the event. Once the event is created, it should exist persistently within the system and will be added to the event list.
The calendar is updated at the creation of any new event that gets displayed on the calendar. Everything is ordered by date and sorted into two categories, past events and future events. Links attached to assignments are displayed in the calendar as well. The footer of the calendar is tagged with the last time it was updated.
The bot contains functionality for handling TA office hours. After a TA office hour event is added and it is time for a TA's office hour to open, the bot will automatically create office hour channels in the server, allowing students to enter the office hour queue and instructors to help students based on the queue. Once the closing time for the office hour is reached, the channels related to the TA's office hour are automatically deleted.
The bot contains functionality for polling with 2 choices (choose one) and multi-choice polling with specified number of choices (2 to 10). The polls can only be created by the Instructor and commands to create them can only be used in instructor-commands channel.
The bot contains functionality for getting information about a member using the username of the member. The command can only be used by the Instructor in instructor-commands channel. It retrieves the Display Name, ID, Account Creation Date and Time, Date and Time of joining the Server, Roles and the Highest Role of the member.
The bot contains functionality that lets Instructor get an example CSV from bot using eventcsv command and upload it back to the bot using take command. This lets Instructor add all the events in one go. When using the take command, drag the csv to discord and use the take command in the comment as you upload it.
This command lets the user display all the homeworks that are due this week for all the courses. Whenever a user wants to be reminded about an upcoming project/assignment he/she can just use a notification command to get the bot to remind the user about the same. Notification can also be sent to email or text.
Using the Python package better-profanity, Teacher's Pet will catch profane words sent by members of the guild, delete the message, and re-send the exact message with the bad word(s) censored out. It will also catch profane words in messages which have been edited to incude bad words. This package supports censoring based off any non-alphabetical word dividers and swears with custom characters. NOTE: Currently the Bot does not censor swears which have had extra alphabetical characters added.
This bot has endless possibilities for functionality. Features which we are interested in adding but did not have time for include but are not limited to:
- Command specific voice channel creation
- Track Participation of Students and their Ranking
- Sentiiment Analysis of messages being sent on the server
- Attendance Tracker
- Conversion of bot to JavaScript
- Data Visualization
- Link Collection
- Cloud Hosting
For a full list of future features, upgrades, and bug fixes, please visit our Project 2 Board.
Check out our CONTRIBUTING.md for instructions on contributing to this repo and helping enhance this Discord Bot, as well as our Code of Conduct guidelines.
This project is licensed under the MIT License.










