Skip to content

Socrative Discord Bot named Chotu , made to automate attendance on socrative

License

Notifications You must be signed in to change notification settings

udaysinh-git/Socrative-Attendance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chotu Bot

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.

Prerequisites

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.

Installing Chotu Bot

To install Chotu, follow these steps:

  1. Clone the repository:
git clone https://github.com/udaysinh-git/Socrative-Attendance.git
  1. Change into the directory:
cd Socrative-Attendance
  1. Install the requirements:
pip install -r requirements.txt

Using Chotu Bot

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

Schedule Configuration

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

Contributing to Chotu Bot

To contribute to Chotu, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin <project_name>/<location>
  5. Create the pull request.

Contact

If you want to contact me you can reach me at [email protected].

License

This project uses the following license: Licenese.

About

Socrative Discord Bot named Chotu , made to automate attendance on socrative

Topics

Resources

License

Stars

Watchers

Forks

Languages