{"id":21463422,"url":"https://github.com/ijustdev/whatzbot","last_synced_at":"2026-01-04T11:11:26.210Z","repository":{"id":169281629,"uuid":"400166528","full_name":"IJustDev/whatzbot","owner":"IJustDev","description":"The websocket-based WhatsApp bot","archived":false,"fork":false,"pushed_at":"2021-09-26T11:11:08.000Z","size":465,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T14:43:14.529Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IJustDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-26T12:48:05.000Z","updated_at":"2021-09-26T11:11:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7cf9a21-b51a-4015-904d-e346d4ed1d84","html_url":"https://github.com/IJustDev/whatzbot","commit_stats":null,"previous_names":["ijustdev/whatzbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2Fwhatzbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2Fwhatzbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2Fwhatzbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2Fwhatzbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IJustDev","download_url":"https://codeload.github.com/IJustDev/whatzbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976479,"owners_count":20377691,"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":[],"created_at":"2024-11-23T07:22:35.928Z","updated_at":"2026-01-04T11:11:26.171Z","avatar_url":"https://github.com/IJustDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# WhatzBot\n\n## The best WhatsApp Bot framework out there\n\nCreate a WhatsApp bot **without any browser simulation**. Use it like an cli\nwith a clean code architecture.\n\n\u003c/div\u003e\n\n## Run the example (Send messages from terminal)\nThere is an example that allows you to query your contact informations and to send\na message to one of your contacts.\nIt's located in src/example.ts.\n\n![Showcase](./resources/showcase.gif)\n\nTo run it simply do following:\n\n```sh\n$ npm install\n$ npm run example:start\n```\n\nAfter that a QR-Code will pop up on your terminal which needs to be scanned by\nyour WhatsApp application. Like you would do with **WhatsApp Web**.\n\n### Script to send the message\nA fzf thingy message sender written in bash. Its located in `tools/wa.sh`.\n\n**Usage**\n1. Start the example with `npm run example:start`\n2. Scan the qr code and wait until the log shows `X contacts found...`\n3. Run `sh tools/wa.sh` and you should see a list of contacts popping up **YOU NEED fzf AND jq INSTALLED**\n4. Search for a contact and hit enter\n5. Enter your message and hit enter, it will be sent to the client\n\n## Write your own bot\n\n```sh\n$ npm install whatzbot\n```\n\n```typescript\nimport { Bot, createConnection, IMessage } from 'whatzbot';\n\nexport class EchoBot extends Bot {\n\n\tonMessageReceived(msg: IMessage) {\n\t\tif (msg.sender !== 'me')\n\t\t\tthis.sendMessage(msg.message, msg.sender);\n\t}\n}\n\nasync function start() {\n\tconst connection = await createConnection({\n\t\tlogLevel: 'info',\n\t\tpinnedChatsFirst: true,\n\t\tsessionFile: './auth_info.json'\n\t});\n\tconst mBot = new EchoBot(connection);\n\tmBot.listen();\n}\nstart();\n```\n\n\n\u003cdiv align=\"center\"\u003e\n\nMade with love and Typescript\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijustdev%2Fwhatzbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fijustdev%2Fwhatzbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijustdev%2Fwhatzbot/lists"}