{"id":15474824,"url":"https://github.com/totigm/whatsapp-bot","last_synced_at":"2025-04-22T14:09:33.558Z","repository":{"id":38347231,"uuid":"506525992","full_name":"totigm/whatsapp-bot","owner":"totigm","description":"This is a library to create WhatsApp bots. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.","archived":false,"fork":false,"pushed_at":"2024-03-11T09:46:07.000Z","size":519,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T02:38:09.560Z","etag":null,"topics":["bot","bot-builder","botbuilder","bots","typescript","whatsapp","whatsapp-bot","whatsapp-js","whatsapp-web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/totigm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-23T06:41:15.000Z","updated_at":"2024-11-18T05:53:39.000Z","dependencies_parsed_at":"2022-08-28T03:43:28.397Z","dependency_job_id":"81526794-fa82-41ae-a6fb-6896ea4844d7","html_url":"https://github.com/totigm/whatsapp-bot","commit_stats":{"total_commits":62,"total_committers":3,"mean_commits":"20.666666666666668","dds":0.09677419354838712,"last_synced_commit":"ddcd4b5b4b451a548916c3c28136a1fc54868dcd"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":"totigm/typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Fwhatsapp-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Fwhatsapp-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Fwhatsapp-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Fwhatsapp-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totigm","download_url":"https://codeload.github.com/totigm/whatsapp-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487715,"owners_count":21112191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bot-builder","botbuilder","bots","typescript","whatsapp","whatsapp-bot","whatsapp-js","whatsapp-web"],"created_at":"2024-10-02T03:04:49.351Z","updated_at":"2025-04-22T14:09:33.533Z","avatar_url":"https://github.com/totigm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to \u003cb\u003e@totigm/whatsapp-bot\u003c/b\u003e 👋\u003c/h1\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@totigm/whatsapp-bot\" target=\"_blank\"\u003e\n    \u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@totigm/whatsapp-bot\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/totigm/whatsapp-bot\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub repo\" src=\"https://img.shields.io/badge/GitHub-@totigm/whatsapp--bot-green?style=flat\u0026logo=github\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@totigm/whatsapp-bot\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/npm/dt/@totigm/whatsapp-bot\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/totigm/whatsapp-bot/actions/workflows/main.yml\" target=\"_blank\"\u003e\n    \u003cimg alt=\"CI\" src=\"https://github.com/totigm/whatsapp-bot/actions/workflows/main.yml/badge.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/totigm/whatsapp-bot/stargazers\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub repo stars\" src=\"https://img.shields.io/github/stars/totigm/whatsapp-bot?style=flat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/totigm/whatsapp-bot#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/totigm/whatsapp-bot/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/totigm/whatsapp-bot\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 📄 Introduction\n\nThis is a library to create WhatsApp bots. It is a WhatsApp implementation of the [@totigm/bot-builder](https://www.npmjs.com/package/@totigm/bot-builder) package, which handles all the commands stuff behind the scenes, so you can focus on your bot's logic.\n\n\u003e The [whatsapp-web.js](https://wwebjs.dev) library is used for this implementation.\n\n## 🔗 Quick links\n\n- [Reference documentation](./docs/reference.md)\n- [Options](#⚙️-options)\n- [Whatsapp-web.js docs](https://wwebjs.dev/guide)\n- [Bot builder](https://www.npmjs.com/package/@totigm/bot-builder)\n- [Discord bot](https://www.npmjs.com/package/@totigm/discord-bot)\n- [GitHub](https://github.com/totigm/whatsapp-bot#readme)\n- [NPM](https://www.npmjs.com/package/@totigm/whatsapp-bot)\n\n## 💻 Installation\n\n```sh\nnpm i @totigm/whatsapp-bot\n```\n\nor\n\n```sh\nyarn add @totigm/whatsapp-bot\n```\n\n## 🚀 Getting started\n\nYou can use this [WhatsApp bot template](https://github.com/totigm/whatsapp-bot-template) to [generate your own](https://github.com/totigm/whatsapp-bot-template/generate). This template has everything set up for you, so you can start coding your bot right away.\\\nThe template has TypeScript, Docker, ESLint, and Prettier already configured, so you have a nice developer experience and a production-ready bot.\n\nStart adding commands to your bot by checking the [reference documentation](./docs/reference.md).\n\n\u003e The [WhatsApp bot template](https://github.com/totigm/whatsapp-bot-template) and [bot examples](#-bot-examples) are also a good reference on how to use this library.\n\n## 🤖 Example usage\n\n```ts\nimport WhatsappBot from \"@totigm/whatsapp-bot\";\n\nconst bot = new WhatsappBot();\n\nbot.addCommand(\n    \"hey\",\n    async (message, client) =\u003e {\n        const chatId = message.from;\n        const contact = await client.getContactById(chatId);\n\n        return `Hey ${contact.pushname}! How are you doing?`;\n    },\n    {\n        description: \"Say hey\",\n        explanation: \"The bot will say hey to the user using their WhatsApp's name\",\n        example: {\n            output: \"Hey Toti! How are you doing?\",\n        },\n    },\n);\n```\n\nThe previous code will create a bot that works like this:\n\n![bot conversation](https://user-images.githubusercontent.com/64804554/185178533-e8a55768-499b-4c78-bdb1-51766f572d51.png)\n\n## 🤩 Bot examples\n\n- [WhatsApp stickers bot](https://github.com/totigm/whatsapp-stickers-bot): WhatsApp bot that converts images and videos to stickers.\n\n## ⚙️ Options\n\nWhen you create a bot, you can pass an options object to customize it. Check its [options](./docs/options.md) documentation for more information.\n\n```ts\nconst options = { ... };\n\nconst bot = new WhatsappBot(options);\n```\n\n## 🚀 Deploying\n\nTo deploy your WhatsApp bot, check out [this template](https://github.com/totigm/whatsapp-bot-template), which creates a [Docker](https://www.docker.com) image with everything needed for the [whatsapp-web.js](https://wwebjs.dev) library to work. This will help you to deploy your bot to the cloud provider of your choice.\n\nThis library automatically checks if the app is being run on a [Docker](https://www.docker.com) container and set its configurations according to that, so you don't have to worry about it.\n\n## 👤 Author\n\n\u003ca href=\"https://github.com/totigm\" target=\"_blank\"\u003e\n  \u003cimg alt=\"GitHub: totigm\" src=\"https://img.shields.io/github/followers/totigm?label=Follow @totigm\u0026style=social\"\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://twitter.com/totigm8\" target=\"_blank\"\u003e\n  \u003cimg alt=\"Twitter: totigm8\" src=\"https://img.shields.io/twitter/follow/totigm8?style=social\" /\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://linkedin.com/in/totigm\" target=\"_blank\"\u003e\n  \u003cimg alt=\"LinkedIn: totigm\" src=\"https://img.shields.io/badge/LinkedIn-%40totigm-green?style=social\u0026logo=linkedin\" /\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://www.npmjs.com/~totigm\" target=\"_blank\"\u003e\n  \u003cimg alt=\"NPM: totigm\" src=\"https://img.shields.io/badge/NPM-%40totigm-green?style=social\u0026logo=npm\" /\u003e\n\u003c/a\u003e\n\n## 🤝 Contributing\n\nContributions are more than welcome!\n\nWe 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](./docs/CONTRIBUTING.md).\n\n## ⭐️ Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2022 [Toti Muñoz](https://github.com/totigm).\u003cbr /\u003e\nThis project is [MIT](https://github.com/totigm/whatsapp-bot/blob/master/LICENSE) licensed.\n\n---\n\nThis project was made with ❤ and TypeScript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotigm%2Fwhatsapp-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotigm%2Fwhatsapp-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotigm%2Fwhatsapp-bot/lists"}