totigm / whatsapp-stickers-bot

This is a WhatsApp bot to convert images and videos to stickers
MIT License
5 stars 2 forks source link
bot stickers typescript whatsapp whatsapp-bot whatsapp-web

🤖 WhatsApp stickers bot

This is a WhatsApp bot to convert images and videos to stickers.

Live demo

💬 Commands

The bot supports two primary commands in addition to the !help command, which can be used by sending an image or video along with the command or by quoting a previously sent image or video in your message:

✨ List of Arguments

Both !sticker and !image commands can be enhanced with these optional arguments:

[!WARNING] For the !sticker command, arguments are applicable only to images, not videos.

[!TIP] Multiple arguments can be combined and used at the same time for more customized effects.

Here is an example of the base command:\ Base command

[!NOTE] For more detailed examples, please see the examples documentation.

📋 Prerequisites

Available Scripts

In the project directory, you can run:

yarn or npm i

Installs every dependency needed for the project.

yarn start or npm start

Runs the app in the development mode.\ The app will reload every time you save a file.

You will also see any lint errors/warnings in the console.

yarn dev and npm run dev do the same.

yarn prod or npm run prod

Runs the app in the production mode.

Before running the app, it will run the linter, format code with Prettier, and build the project.

yarn build or npm run build

Builds the app for production to the build folder.

Your app is ready to be deployed!

yarn prod and npm run prod do the same, and also run the app after building it.

yarn lint or npm run lint

Runs the linter and logs every error and warning to the console.

yarn lint:fix and npm run lint:fix fix every autofixable error/warning.

yarn prettier or npm run prettier

Runs Prettier and logs every error and warning to the console.

yarn prettier:fix and npm run prettier:fix fix every autofixable error/warning.

yarn check or npm run check

Runs both the linter and Prettier and logs every error and warning to the console.

yarn check:fix and npm run check:fix fix every autofixable error/warning.

🚀 Deploying

A normal Dockerfile for a Node.js app won't work for this bot, as the whatsapp-web.js library uses Puppeteer, and needs Chromium to run.\ This project's Dockerfile handles every installation, and sets the whole environment needed for the bot to run and be authenticated.

If the Docker image is built in a directory that has a .wwebjs_auth folder, it will use that file to authenticate and the container will start the bot without further authentication. If not, a QR code will be logged to the console and the user will have to scan it to authenticate.

🐳 Docker

You can use Docker to run your app. This project has a multi-stage build process so your final image doesn't have any TypeScript files nor dev dependencies, resulting in a smaller image size.

To build your image run: docker build -t <image-name> .

To run your image run: docker run -p 80:80 <image-name>

If you haven't used Docker before, you can get started with it here.

👤 Author

GitHub: totigm


Twitter: totigm8


LinkedIn: totigm


NPM: totigm

🤝 Contributing

Contributions are more than welcome!

We think that you might have great ideas to make this project even better. If you do, please create a pull request and/or issue following the contribution guidelines.

⭐️ Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Toti Muñoz.
This project is MIT licensed.


This project was made with ❤ and TypeScript