wa-automate-nodejs
wa-automate-nodejs copied to clipboard
sendButtons not working
Are you using the latest version of the library?
- [X] I have checked and am using the latest version of the library.
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
sendButtons not responding
Expected Behavior
respond perfectly
Steps To Reproduce
- All went well, .reply, .sendText can be used
- I tried .sendButtons but it doesn't work and no response
- Even the error does not appear.
- I have checked your documents and libraries many times
create() code OR full CLI command + CONFIG
[This is file in index.js]
const {create, Client} = require("@open-wa/wa-automate")
const msgHndlr = require("./msgHndlr.js")
const options = require("./options.js")
const start = async(putra=new Client()) =>{
putra.onMessage((async(message=>{
msgHndlr(putra,message)}
}
create(options(true, start))
.then(putra => start(putra))
.catch((error)=>console.log(error))
[This is file in msgHndlr.js]
module.exports = msgHndler = async(putra,message) => {
try{
const {from} = message
putra.sendButtons(from, "Hello", [{id:"1","text":"Readme"},{id:"2","text":"Profile"}], "list", "")
} catch(err) {
console.log(err)
}
DEBUG INFO
{
"WA_VERSION": "2.2230.9",
"WA_AUTOMATE_VERSION": "4.43.2",
"BROWSER_VERSION": "HeadlessChrome/104.0.5112.81",
"START_TS": 1660133449695,
"RAM_INFO": "Total: 4.21 GB | Free: 1.45 GB",
"PPTR_VERSION": "15.0.0",
"LATEST_VERSION": true,
"CLI": false,
"PATCH_HASH": "caadf",
"LAUNCH_TIME_MS": 27395,
"ACC_TYPE": "BUSINESS",
"chats": 3,
"messages": 15,
"contacts": 176,
"isBiz": true,
"isMd": true,
"INSTANCE_ID": "372ddb3c-05ef-4dc9-aabc-70f9c6919191"
}
Environment
- OS: Windows 10
- Node: 16.16.0
- npm: 8.11.0
Screenshots/Logs

Anything else?
You selected in the issue that you are using a legacy account. But the debug shows that you're now on MD. Buttons are an insiders' feature on MD accounts. Do you have a license? Not sure why it's not showing you an error.
So what should I do? and give me a hint, i just learned this
Here too it doesn't work even with the multi device active
@ngoding-bro you will see the error as the response from your buttons code:
console.log(await putra.sendButtons(from, "Hello", [{id:"1","text":"Readme"},{id:"2","text":"Profile"}], "list", ""))
@github-actions run
⚡ Release! ⚡
(async () => {
function exec(cmd) {
console.log(execSync(cmd).toString());
}
//set the version type
process.env.VERS = "patch"
// 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 -D`);
exec(`npm run release-ci $VERS`);
// types only package
exec('npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN')
exec(`cd ./types-only && npm version $VERS && npm run build && npm publish && cd ..`);
exec(`git commit -a -m 'updated types-only package'`);
exec(`git push --force`);
//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`);
})();
In the latest release it will output in the console if the feature you're using requires an insiders license.
@allanlisboa
@ngoding-bro
Can you please update, try again and then paste your logs here.
Till then, closing.
Could you explain what this insider license is?