Chotu is a Discord bot built with Nextcord and MongoDB. It has features like scheduling tasks, marking attendance, and handling messages in specific channels for Socrative Website.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Python.
- You have a Windows/Linux/Mac machine.
- You have read the Nextcord documentation.
- You have a MongoDB Atlas account.
- You have a Discord bot token. You can follow this guide to get one.
- You have an OpenAI API token. You can follow this guide to get one.
To install Chotu, follow these steps:
- Clone the repository:
git clone https://github.com/udaysinh-git/Socrative-Attendance.git
- Change into the directory:
cd Socrative-Attendance
- Install the requirements:
pip install -r requirements.txt
To use Chotu, you need to set up a few
environment
variables:
DISCORD_TOKEN
: Your Discord bot token.MONGO_URI
: Your MongoDB connection string.ATTENDANCE_CHANNEL
: The ID of the channel for marking attendance.ATTENDANCE_REMOVAL_CHANNEL
: The ID of the channel for removing attendance.ANNOUNCEMENT_CHANNEL
: The ID of the channel for announcements.
You can set these in a .env
file in the root of your project:
DISCORD_TOKEN=MTxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxx
MONGO_URI=mongodb+srv://{username}:{Password}@xxxxx-xxxxxx.mongodb.net/admin
ATTENDANCE_CHANNEL=channel_id // where people will message for attendance
ATTENDANCE_REMOVAL_CHANNEL=channel_id // where people will message to revoke auto-attendance
ANNOUNCEMENT_CHANNEL=channel_id // Where bot will announce it has started marking attendance for room id
After setting up the environment variables, you can run the bot with:
python main.py
To configure the bot's schedule, you need to modify the schedule.csv file. The file should contain three columns: day, time, and room. The day should be the full name of the day (e.g., Monday), the time should be in 24-hour format (e.g., 16:13), and the room should be the room ID. It is recommended to set the time half an hour into the lecture to ensure the bot starts when there is a chance of having attendance.
Example:
day,time,room
Monday,16:13,TESTSOCRATIVE
To contribute to Chotu, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
If you want to contact me you can reach me at [email protected]
.
This project uses the following license: Licenese.