An open API service indexing awesome lists of open source software.

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

🤖 File-based Whatsapp Bot
https://github.com/guivictorr/whatsapp-bot

automation bot hacktoberfest javascript nodejs typescript whatsapp whatsapp-bot whatsapp-web

Last synced: 5 months ago
JSON representation

🤖 File-based Whatsapp Bot

Awesome Lists containing this project

README

          

🤖 Whatsapp Bot

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

## 👍 Acknowledgments and Credits

- [@pedroslopez](https://github.com/pedroslopez)
- [@caioagiani](https://github.com/caioagiani)

## 🛠 Technologies

This project was developed using the following technologies:

- [Whatsapp-web.js](https://github.com/pedroslopez/whatsapp-web.js)
- [NodeJS](https://nodejs.org/)
- [Typescript](https://typescriptlang.org/)
- [qrcode-terminal](https://www.npmjs.com/package/node-base64-image)

## 📱💻 Instructions

Assuming you already have [Node](https://nodejs.org) 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
```

---

### 🔨 Creating Commands

To create commands, simply create a `.ts` file in /commands folder

Example:

```ts
export default async function commandName(
msg: Message,
args: string[],
): Promise {
// some code
return msg.reply('Hello World');
}

export default commandName;
```

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

### 📌 Animated Stickers

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

1. Download **[FFMPEG](https://ffmpeg.org/)**

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](https://whatsapp.com/).
"WhatsApp" as well as names, brands, logos, and related images are registered trademarks of their respective owners.