/ClassMateBot

This project helps to improve the life of students, TAs and teachers by automating many mundane tasks which are sometimes done manually. ClassMateBot is a discord bot made in Python and could be used for any discord channel.

Primary LanguagePythonMIT LicenseMIT

Click here to watch the video explaining Phase 3 improvements and new features - Evaluation media

image

                    Python License DOI Python application codecov

Basic Overview :: Description :: Installation :: Commands :: Future Scope :: Contributors


🎯 Basic Overview

Watch the video

This project helps to improve the life of students, TAs and teachers by automating many mundane tasks which are sometimes done manually. ClassMateBot is a discord bot made in Python and could be used for any discord channel.

In Iteration 2, we added 6 main quality-of-life improvements to be more useful to admins (Professor and TA) and students alike.


📙 Description

There are three basic user groups in a ClassMateBot, which are Students, Professor and TAs. Some basic tasks for the bot for the students user group should be automating the task of group making for projects or homewroks, Projection deadline reminders, etc. For TAs it is taking up polls, or answering FAQs asked by the students. Our ClassMateBot focuses on the student side of the discord channel, i.e. currently it focuses on the problems faced by the students while using these discord channels.The user stories covered here would be more concerned about the activities for the channel for Software Engineering class in North Carolina State University for the Fall 2021 semester.

For Iteration 3, we aimed to expand the Bot's functionality so Professors and TAs can be more efficient and widened our scope outside of just our Software Engineering class. We researched how different roles and channels help in ease of communication and tracking. We believe our bot's commands like attendance, sending reminders to all members, auto numbering of questions, new channels for different tasks and etc, greatly benefits class management and information distribution.


Phase 1 Features

You can find the Features from Iteration 1 here

Phase 2 Features

You can find the Features from Iteration 2 here


Phase 3 Features

1. New channels and roles

We have introduced more channels for ease of communication. We have below channels created at the start of the bot,

  • Instructor
  • Q-and-A
  • TA
  • Course Calendar

We have introduced roles for better classification of the members and to restrict access for certain commands. We have added below roles,

  • Instructor
  • TA
  • Student
  • Guest

2. Instructor commands

We have multiple commands to handle functionalities related to instructor roles. Only the instructors have access to the instructor cannel and we have restricted ceratin commands(like attendance) to be used only in that channel.

3. TA commands

We have multiple commands to handle functionalities related to TA roles. Only TAs and Instructors will have access to the TA channel but unlike instructors channel they aren't any channel specific commands yet.

4. Direct Messaging

Direct messsaging commands allows people to dm privately to any other member of the guild. We also have a command to send a reminder message or a broadcast message to all the members of the guild privately.

5. Attendance

The instructors can check the attendees and absentees list using this command. This can be executed only in the instructors channel. This will also show them a pie chart of the same.

6. Profanity

This enables users to add a custom word to the profanity filter. These words will be added to the profanity filter and will be blocked from the messages.

7. Question and Answer

This functionality enables users to ask questions in the q-and-a channel. They can ask it as themselves, that is, the author name will be displayed next to the question, or they can ask questions anonymously. All the questions are auto-numbered for ease of tracking.

Members can also answer these questions. The role will be displayed next to the answer.

8. Spam warning and Ban

When a member is spamming the server, after 5 consecutive messages within a short span of time, they will get a warning. The Instructors/TA can ban the spammers or members if necessary. An unban command is also added.

9. Reminder

This functionality enables members to set a personal reminder. After the given amount of time, the bot will remind you in the same channel.

10. Cog Maintenance

This enables ease usage of cogs. Every feature is represented as a cog in our development model. This functionlity eable easy maintenance of the cogs. You can load, unload or reload a cog with simple commands.


⬇️ Installation

  1. Clone the Github repository to a desired location on your computer. You will need git to be preinstalled on your machine. Once the repository is cloned, you will then cd into the local repository.
git clone https://github.com/chandur626/ClassMateBot.git
cd (into the ClassMateBot folder. If you type the commmand "ls", you should see the contents of the ClassMateBot folder)
  1. This project uses Python 3, so make sure that Python and Pip are preinstalled. All requirements of the project are listed in the requirements.txt file. Use pip to install all of those.
pip install -r requirements.txt
  1. Once the installation is complete with requirements installed, you have to generate a .env file and place it in the root of your project folder. The .env file contains your bot TOKEN and your Discord GUILD (guild is your discord server name). Check out this video to see how you can setup your discord developer settings and .env file. You may also contact Niraj Lavani (nrlavani@ncsu.edu) for additional information on this process.
PLEASE DO NOT SHARE THE TOKEN ONLINE, 
DO NOT UPLOAD TO GITHUB OR ELSE THE TOKEN WILL AUTOMATICALLY GET DESTROYED AND HAS TO BE REGENERATED.
  1. Once all the requirements are installed, use the python command to run the bot.py file.
python3 bot.py 

💻 Commands

Version 3 Commands

Attendance

📂 $takeattendance command

Messaging

📂 $DM command

📂 $reminder command

Profanity

📂 $custom command

Question and Answers

📂 $ask command

📂 $askanonym command

📂 $answer command

New Role - Instructor

📂 $getInstructor command

📂 $setInstructor command

📂 $removeInstructor command

New Role - TA

📂 $getTA command

📂 $setTA command

📂 $removeTA command

Spam Warning and Ban

📂 $ban command

📂 $unban command

📂 Spam Warning

Reminder

📂 $remindme command

Cog Maintenance

📂 $loadCog command

📂 $unloadCog command

📂 $reloadCog command

Version 2 Commands

Data Visualization

📂 $grades command

📂 $attendance command

📂 $customchart command

📂 $checkgrade command

📂 $checkattendance command

📂 $checkchart command

User Ranking

📂 $levels command

📂 $add_database command

Email Specification

📂 $add_email_command

📂 $view_email_command

📂 $update_email command

📂 $delete_email_command

Auto-Grouping

📂 $auto-assign_command

📂 $find-group_command

📂 member remove event

Sentiment Analysis

📂 $sentiment_analysis_command

Link Saving

📂 $send_links_command

Original Commands

For the newComer.py file

📂 $verify command

For the voting.py file

📂 $projects command

📂 $vote command

For the deadline.py file

📂 $add_homework command

📂 $change_reminder_due_date command

📂 $clear_all_reminders command

📂 $course_due command

📂 $delete_reminder command

📂 $due_this_week command

📂 $due_today command

📂 $list_reminders command

For the pinning.py file

📂 $pin command

📂 $unpin command

📂 $pinnedmessages command

📂 $updatepin command

For the groups.py file

📂 $group command

📂 $join command

📂 $remove command


🌎 Future Scope

Project 3 TODO tasks are located in the Projects tab.


✏️ Contributors

Version 3

Ashwin Shankar

Kailash Singaravelu

Itha Aswin

SaiKaushik

Shakthi Nandana Govindan

Version 2

Chandrahas Reddy Mandapati

Sri Pallavi Damuluri

Niraj Lavani

Harini Bharata

Sandesh Aladhalli Shivarudre Gowda

Version 1

Chaitanya Patel

Evan Brown

Kunwar Vidhan

Sunil Upare

Sumedh Salvi