It would be nice if there was a function that would return the last message sent by the bot in a given chat. The currently method that I'm using is to call getAllMessagesInChat() and then loop it backwards until I find the last bot message. But, getAllMessagesInChat() takes a while to return the list of messages.
@github-actions run
âš¡ Release! âš¡
(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`);
})();
#928#929#930#922#92746e1fd8sendAudio as alias for sendPtt and example in demo b8e4440getMyLastMessage #924 b357b1e462fadb836b676@pedrogrisolia https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getmylastmessage
You are awesome, thanks!