Skip to content

Latest commit

 

History

History
123 lines (71 loc) · 3.04 KB

README-ENG.md

File metadata and controls

123 lines (71 loc) · 3.04 KB

🤖 Whatsapp Bot

A bot for WhatsApp created using a library that simulates real-time WhatsApp Web connection.

👍 Acknowledgments and Credits

🛠 Technologies

This project was developed using the following technologies:

📱💻 Instructions

Assuming you already have Node installed.

## 1. Clone the repository

git clone https://github.com/guivictorr/whatsapp-bot.git



## 2.  Enter the folder

cd whatsapp-bot



## 3. Install dependencies

npm i



## 4. Configure the .env file



## 5. Run the application

npm run dev



## 6. Scan the QR code that appears in the terminal

❗ Commands

  • !gpt [prompt]
  • !dalle [prompt]
  • !covid state
  • !cotacao
  • !perfil
  • !figurinha
  • !eununca
  • !membros (Group)
  • !perfil @contact (Group)
  • !ban @contact (Group)

🔨 Creating Commands

To create commands, simply create a .ts file in one of the group folders for commands valid only in groups or global for globally valid commands.

Example:

const commandName = async (msg: Message, args: string[]): Promise<Message> => {
  // some code
  return msg.reply('Hello World'); // return msg.reply(string)
};

export default commandName;

Once the file is created, the command will be functional.

🤖 Open AI

To use the !gpt and !dalle commands, you need to add environment variables:

You can obtain these credentials by creating an account on the OpenAI website.

📌 Animated Stickers

To use the !figurinha command with gifs and videos, it is necessary for you to:

  1. Download FFMPEG

  2. In the .env file, configure the FFMPEG_PATH environment variable with the path to ffmpeg

💡 You can try using the whereis ffmpeg command to find the path.


🤔 How to Contribute

  • Fork this repository;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit your changes: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

Once your pull request is merged, you can delete your branch.

❗ Disclaimer

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as names, brands, logos, and related images are registered trademarks of their respective owners.