├── README.md ├── package.json └── index.js /README.md: -------------------------------------------------------------------------------- 1 | # Auto-Claim-Hi 2 | Auto Claim Hi.com 3 | 4 | ## Requirements 5 | - NodeJS 6 | 7 | ## Installations 8 | ``` 9 | $ git clone https://github.com/vsec7/Auto-Claim-Hi.git 10 | $ cd Auto-Claim-Hi 11 | $ npm install 12 | $ npm start 13 | ``` 14 | 15 | ./Cath 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hi-auto-claim", 3 | "version": "1.0.0", 4 | "description": "hi.com auto claim", 5 | "main": "index.js", 6 | "devDependencies": {}, 7 | "scripts": { 8 | "start": "node index.js" 9 | }, 10 | "dependencies": { 11 | "@open-wa/wa-automate": "^4.14.0", 12 | "node-cron": "^3.0.0" 13 | }, 14 | "keywords": [ 15 | "bot" 16 | ], 17 | "author": "vsec7", 18 | "license": "ISC" 19 | } 20 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const wa = require('@open-wa/wa-automate'); 2 | const cron = require('node-cron') 3 | const delay = ms => new Promise(resolve => setTimeout(resolve, ms)) 4 | const hi_number = "85263614737"; 5 | 6 | wa.create().then(client => { claim(client) }); 7 | 8 | async function claim(client) { 9 | 10 | // contoh run setiap hari pada pukul 13:37 menurut localtime system 11 | cron.schedule('37 13 * * *', async () => { 12 | await client.sendText(hi_number + "@c.us", 'hi'); 13 | await delay(60000) 14 | await client.sendText(hi_number + "@c.us", '1'); 15 | await delay(60000) 16 | await client.sendText(hi_number + "@c.us", '1'); 17 | }) 18 | 19 | } 20 | --------------------------------------------------------------------------------