Wa-automate-nodejs: Using SendFile & Reply Message ?

Created on 17 Apr 2020  Â·  9Comments  Â·  Source: open-wa/wa-automate-nodejs

Hi ,

Can we sendfile as a reply to message ?

Thanks

enhancement good first issue

Most helpful comment

@m7mdcc You can now sendImage, sendFile and sendVideoAsGif as a reply to a message.

// You just need to add the message.id as the last parameter on each of those methods to reply to said message. E.g
await client.sendImage('data:image/jpe...`,'[email protected]`,'file.jpeg','cool caption','[email protected]__32IUH2IUNFI2U3')

All 9 comments

Not yet but it can be implemented.

@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`);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);

var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);
  })();

Changelog

🚀 Release 1.8.64 (2020-04-18)

  • Release 1.8.64 30e2954
  • now able to reply to messages with images, videos, files and gifs #332 4bfb20f
  • improved reply and getNewMessageId 9534ece
  • updated release-image 4ed6ab7

@m7mdcc You can now sendImage, sendFile and sendVideoAsGif as a reply to a message.

// You just need to add the message.id as the last parameter on each of those methods to reply to said message. E.g
await client.sendImage('data:image/jpe...`,'[email protected]`,'file.jpeg','cool caption','[email protected]__32IUH2IUNFI2U3')

I will test , sendFileFromUrl doesn't have this option right ? :(

@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`);
  })();

Changelog

🚀 Release 1.8.68 (2020-04-19)

  • Release 1.8.68 3415882
  • added quotedMsgId param to sendFileFromUrl, fixed docs #332 78a36b6

@m7mdcc it should work now.

@smashah Tested , working exactly as expected ! Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alishahlakhani picture alishahlakhani  Â·  7Comments

sandro-salles picture sandro-salles  Â·  4Comments

renato-macedo picture renato-macedo  Â·  6Comments

smashah picture smashah  Â·  5Comments

DeLuca92 picture DeLuca92  Â·  5Comments