open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.14k stars 600 forks source link

Insiders feature: onGlobalParticipantChanged #489

Closed smashah closed 4 years ago

smashah commented 4 years ago

A single listener for all participant changed events in all groups.

smashah commented 4 years ago

@github-actions run

âš¡ Release! âš¡ ```js (async () => { function exec(cmd) { console.log(execSync(cmd).toString()); } // Config const gitUserEmail = "github-actions[bot]@users.noreply.github.com"; const gitUserName = "github-actions[bot]"; exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`); exec(`git config --global user.email "${gitUserEmail}"`); exec(`git config --global user.name "${gitUserName}"`); exec(`npm i`); exec(`npm run release-ci`); //comment on the issue var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString(); await postComment(result); //create changelog image exec(`npm run release-image`); exec(`git commit -a -m 'updated release-image'`); exec(`git push --force`); })(); ```
smashah commented 4 years ago

Changelog

🚀 Release 1.9.67 (2020-06-10)

smashah commented 4 years ago

With onGlobalParticipantsChanged, you no longer have to add a specific group id.

https://open-wa.github.io/wa-automate-nodejs/classes/client.html#onglobalparicipantschanged

client.onGlobalParicipantsChanged(change=>console.log(change))