Inbot

Inbot is a discord bot submission to LyonHacks III.

Dependencies

  • py-cord
  • google-api-python-client
  • google-auth-httplib2
  • google-auth-oauthlib
  • requests

How to use it

New application button

  • Navigate to the "Bot" section and copy the token

Bot token

  • Navigate to "OAuth2" and "URL Generator" and select these 2 options and invite the bot to a server

Permissions

  • Finally change the .env file to contain your bot token and run main.py

Inspiration for the Idea

Don't we all tired of checking our emails? And aren't we all chronically online on Discord? This is the thought that sparked off the journey to create Inbot.

What it does

Inbot uses Gmail API and py-cord in order to create a bot that functions as a inbox. The bot has 2 main functions, reading emails and sending emails. Reading emails sends you and message every time you receieve a new email, containing the sender, subject and body content. After, the bot makes the email read. Sending emails allows users to send emails to 1 specified email address. They are able to attach 1 file.

How we built it

We first made a Discord bot in Python that can accept slash commands. Then we researched about the Gmail API and them intergrated that into our Discord bot. We then spent a long time figuring out how Google monitors and enforces security.

Challenges we ran into

Badly documented code. Someone's(Alex's) sleep schedule, No previous experience with API's, databases and setting up webservers.

Accomplishments that we're proud of

Functional discord bot to access Gmail, with the ability to read and send emails. An almost-functional SQL webserver

What we learned

We learned a lot about how Python works as a language, and also to connect it with making a Discord bot. In addition, the Gmail API taught us a lot about the security and safety precautions used by Google to keep your private mail safe. We also learned how to use SQL with Python, despite not using it, and it provides us with the basic knowledge for future projects.

What's next for Inbot

In the future, we want to make our bot run globally, allowing other users to access the bot. This requires us to host a server for all users to connect to and databases to hold each person's token.

Built With

Share this project:

Updates