Skip to content

GabrielHinz/whatsbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp Bot

This project implements a WhatsApp bot using the Selenium WebDriver. The bot is designed to automate various interactions on the WhatsApp platform, such as authenticating, opening contacts, reading messages, sending messages and ChatGPT integration.

At this moment you can use the bot to:

  • Open contacts based on name
  • Read chat messages
  • Send chat messages
  • ChatGPT integration

Requirements

Before running the project, make sure you have the following requirements installed:

  • Python (version 3.8.7)
  • Selenium - For run webdriver
  • OpenAI - For ChatGPT Integration

Installation

  1. Clone the repository:
git clone https://github.com/GabrielHinz/whatsbot.git 
  1. Navigate to the project directory:
cd whatsbot
  1. Installing dependencies:
pip install -r requirements.txt

Note: Make sure firefox is installed, it will be used in this project

Configuration

Change the configuration in the config.yml file.

Example Usage

  1. Run the example.py file:
python example.py
  1. Wait and write the contact name in terminal
Which contact do you want to open? _My_Contact_Name_

Note: The first time you run this program it will authenticate in whatsapp, if it takes too long it may timeout. Adjust the time in the config file if needed.

ChatGPT Integration

  1. Open the chatgpt.py file and write your API token
# Insert your OpenAI api key
openai.api_key = "" 
  1. Run the chatgpt.py file:
python chatgpt.py

Contribution

If you would like to contribute to this project, please follow the steps below:

  1. Fork this repository.
  2. Create a feature branch (git checkout -b feature/feature-name).
  3. Make the desired changes.
  4. Commit the changes (git commit -am 'Add a new feature').
  5. Push to the branch (git push origin feature/feature-name).
  6. Open a Pull Request.

Authors

  • Gabriel Hinz - DevOps Eng. - About

License

This project is licensed under the MIT License (LICENSE.md)

Releases

No releases published

Packages

No packages published

Languages