Skip to content

kgudipe/SE_PROJ3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

ScheduleBot logo

Python v3.9 Maintenance PRs Welcome License: MIT DOI GitHub issues GitHub issues-closed example workflow GitHub code size in bytes GitHub commit activity (branch) GitHub top language GitHub release (with filter) GitHub all releases Contributors Platform codecov

ScheduleBot

Don't let the fear of the time it will take to accomplish something stand in the way of your doing it. The time will pass anyway; we might just as well put that passing time to the best possible use. - Earl Nightingale

Getting Started :: For Developers :: What's new in V4 (Our addition to the project!)

Version 4 Submission Video

Click on the image below to check out the video!

IMAGE ALT TEXT

ScheduleBot is a Python application that helps you calendarize events and work through a Discord bot. Want to try it out? Simply follow the steps outlined in the For Developers section. ScheduleBot can be configured to run on your Discord server by adding just one line of code!

With ScheduleBot you can quickly schedule events, state your prefered times for certain types of activities (exercise, homework, meetings, etc.) and quickly find out which times you have available to do more stuff.

🚀 Getting started

To get a list of commands, DM the bot the command:

!help

The bot will reply back you with the list of available commands.

Screen Shot 2021-11-03 at 10 15 04 PM

Scheduling an event

ScheduleBot's unit of work is the event. When you use ScheduleBot to organize your activities, it keeps track of your registered events. Each event consists of a period of time, comprised between a starting and ending date/time, event type, event priority and optional notes.

To schedule a new event, just DM the bot:

!schedule

The bot will ask you the details of your new event. Screen Shot 2021-11-03 at 10 15 04 PM

I forgot my agenda for the day

You can take a look at your events scheduled for a specfic date with the command:

!day today(or tomorrow\yesterday)
!day 3 (3 days from now)
!day -3 (3 days ago)
!day 4/20/22 (On Apr 20, 2022)

The bot will show you what you have scheduled for the date. This includes events that start before, or end after this date.

Day

Import & Export your calendar

You can import or export their calendar events as a CSV file through the bot. You can also import ICS files downloaded from Google Calendar.

!exportfile

Export file

!importfile

Then drag the file to the Schedulebot.

Import file

Looking for an event summary or want to know when you are free?

ScheduleBot will help you find your free times. Just write:

!freetime

To look for event summary:

!summary

Screen Shot 2021-11-03 at 10 15 04 PM

💭 For Developers

Get your Discord bot

Follow this tutorial to create your discord bot account.

Token

To "login" to your bot through our program, place a file named config.py in your src directory with the content:

TOKEN = ************(your discord bot token)

Intall required packages

pip install -r requirements.txt

Connect to Google Cloud

  1. Create a Project
  2. Setup Billing
  3. Enable geocoding API and distancematrix API
  4. Generate API key- Refer to this link for more information about the same.
  5. Store the API key in the following format- File name: key.json
    File Content:
    {"key": "your api key here"}
    
  6. Key needs to be stored in the json folder.

Run the schedulebot.py

python3 schedulebot.py

Then your scheduleBot should start working.

Releases

  • v1.1: First functional release
  • v2.0: First version 2 release with import/export events function, find available time feature, also supports 24 hour time format and event priority.
  • v2.1: Finalized version 2, check what's new in V2
  • v3.0 Finalized version 3, check out what's new in V3
  • v4.0 Finalized version 4, check out what's new in V4!

💫 Features in V2:

Please note that this is not an exhaustive list, however it does include all major improvements. For a complete list of all changes and bug fixes, please see our closed github issues or commit history.

Import & Export your calendar

The user can now import or export their calendar events as a CSV file through the bot. The user can also import ICS files downloaded from Google Calendar.

Find time based on schedule + preferred time

ScheduleBot can help you find available times for a type of event based on your schedule and preferred time for the event type.

Event types with priority

Users can now assign a priority value for each event. This will help them keep track of important events. It also provides a foundation for future improvements, such as suggesting event removals based on the priority of events.

Support 24-hour time format input

We support 24-hour time format input now, in addition to the 12-hour format.

User's files encryption/decryption

User's data is now encrypted when it is stored in the host server, so the host will not be able to see other users' schedules as easily. This improves user's privacy when using Schedulebot.

Check schedule for arbitrary days

Users are able to check the schedule for any specific day in addition to today. Previously, only the events occurring today could be retrieved by the user.

Code coverage improvement

In this version, we improved the project's code coverage from 39% to 54%.

Code coverage remains low in this project because many sections of code require a Discord channel, and responses from a non-bot user through Discord. However, we were able to create a mock discord channel and user for several tests by using the "dpytest" library.

Fixed bugs related to the welcome message sent at startup

At startup, the bot now sends an on_ready welcome message to all servers the bot is currently listening to, instead of just one specific server. The bot also no longer attempts to respond to reactions to the welcome message made by itself or other bots.

Fixed bugs related to finding freetime

!freetime function was not working under certain circumstances, such as when there was only one event in the schedule. This has been fixed in the latest version.

Getting involved

Thank you for caring for this project and getting involved. To start, please check out contributing and code of conduct. For more technical detail of implementation of code, you can check out the documentation. When you want to get your hands on the project, take a peek into the github project, assign yourself a task, move it to To-Do, and convert it into an issue and assign it to yourself.

Check out the internal documentation if you want to contribute or find out about the inner workings of ScheduleBot.

💪 Features in V3:

Following are the new features that we have implemented for version 3 :

1. Connection to Google:

We have added the functionality to connect the account to google calendar As and when we create events on discord those events get scheduled in your google calender.

Feature1.mp4

2. Adding location of an event

We are now storing the location data of the events

feature.2.mp4

3. Adding travel time as a separate event before the actual event

The bot adds a separate event to block of travel time to an event

feature.3.mp4

4. Delete Event from schedule

User can delete events from their schedule

feature.4.mp4

5. Added a new functionality to check daily summary

Ability to view the daily summary of events

feature.5.mp4

6. Code Coverage improvement

For this version, we have improved the project's code coverage from 54% to 65%.

7. Viewing Google Calender events

User can check their next 10 events in the google calendar

Feature.7.mp4

✨ What's new in V4:

Following are the new features that we have implemented for version 4 :

1. Adding events to Google Calendar directly from discord:

So far, !GoogleEvents command imports the events from Google Calendar to your discord. We have been able to add new events directly from the discord terminal to the user's google calendar. The bot returns the google calendar link once the event is successfully created. The user can then view their events on their google calendars.

Screen Shot 2021-11-03 at 10 15 04 PM

Screen Shot 2021-11-03 at 10 15 04 PM

2. Sending Reminders for events created:

Want to be reminded before each event? Don't worry! Schedule Bot's here for the rescue. We have added an option for google to send reminders to the user through popup message five minutes before the event start time and an email an hour before the event start time.

Screen Shot 2021-11-03 at 10 15 04 PM

Screen Shot 2021-11-03 at 10 15 04 PM

3. Displaying the weather for the day along with the day's events:

Get each day's weather and temperature information along with the list of events you planned for the day. The Bot displays weather conditions in the event location (for each event) on a particular day when user types in the command to view summary of the events scheduled for that day. Type in the following command for the weather to be displayed:

!day today

Screen Shot 2021-11-03 at 10 15 04 PM

4. Fixed the bug caused by the delete event command:

On executing the !deleteEvent command, the bot kept sending multiple "event does not exist" messages, even though the event does exist. That bug has been fixed in this version!

Following was the issue:

Screen Shot 2021-11-03 at 10 15 04 PM

Once the issue got resolved:

Screen Shot 2021-11-03 at 10 15 04 PM

Here are some ideas for the future collaborators

These are example features that could be added to ScheduleBot in the future.

Weather for the next 3 days

Currently weather is shown for a particular day. It can be shown for the next few days too.

Adding a Google Maps link for travel

When the user blocks out time for travel from one place to another, along with calculating the distance and time required to travel, the bot can send a Google Maps link to help the user navigate.

Edit event

You can edit the event you created:

!eventedit

Deleting the event from Google Calendar, once it gets deleted from discord

Currently, the events can be deleted on discord. What can be added is, getting them to be deleted from Google Calendar too.

Collaborators

AkhilSai Chittipolu

Koushik Gudipelly

Sai Ritwik Pokala

Sai Santhosh Garlapati

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published