Skip to content

A Discord Calendar bot that syncs with Google Calendar

License

Notifications You must be signed in to change notification settings

shourya5/Calendar_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calendar_bot

Calendar bot is a discord bot that syncs with Google Calendar.It can be used as a personal companion to Google Calendar on discord or as a discord event management service that syncs with Google Calendar

Installation

Ensure the python package manager pip is updated to the latest stable build

Run the following commands to install the required dependencies

pip install --upgrade google-api-python-client google-auth-httplib2  google-auth-oauthlib
pip install discord
pip install python-dateutil

Usage

Setup

Navigate to the directory where calendar_bot is located

create a .env file and enter your discord bot token in this format:

DISCORD_TOKEN = {your bot token here}

This is the environment variable that main_bot.py acceses the bot token from

Run this command:

python3 main_bot.py

The CLI will display an authentication link.Visit this link,and login with your Google Account.grant all permissions and then copy the authentication code and paste it into the CLI like this:

Enter authentication code:{Authentication Code Here}

Setup is complete.You will not need to login the next time you run this bot.

Bot commands

$eventstoday

Use the command like this:

$eventstoday {number of events displayed}
       OR
$eventstoday

EXAMPLE:$eventstoday 3

Displays all upcoming events for the current date and time. example

show

Has an optional {number of events displayed} argument.The default number of events displayed is 5.

$eventstommorow

Similiar to $eventstoday

Use the command like this:

$eventstommorow {number of events displayed}
       OR
$eventstommorow

Displays all upcoming events for the next day Has an optional {number of events displayed} argument.The default number of events displayed is 5.

$eventsyesterday

Similiar to $eventstoday

Use the command like this:

$eventsyesterday {number of events displayed}
       OR
$eventsyesterday

Displays all past events for the previous day Has an optional {number of events displayed} argument.The default number of events displayed is 5.

Contributing

Pull requests are accepted.Please open an issue if you find a bug or have an idea for a feature.

License

MIT

Releases

No releases published

Packages

No packages published

Languages