Closed assiz-git closed 6 months ago
Tambem estou com o mesmo problema. Consigo enviar a lista retorna OK mas nao aparece na tela. No caso seria quando eu envio a Letra B
`async function start(client) { client.onMessage(async (message) => {
if (message.body.toLowerCase() === '/list') {
///envia uma lista sem simples.
} else if (message.body.toLowerCase() === 'b') {
// Opções dos botões
// Construindo a mensagem com botões
const list = [
{
title: "Pasta",
rows: [
{
title: "Ravioli Lasagna",
description: "Made with layers of frozen cheese",
}
]
},
{
title: "Dessert",
rows: [
{
title: "Baked Ricotta Cake",
description: "Sweets pecan baklava rolls",
},
{
title: "Lemon Meringue Pie",
description: "Pastry filled with lemonand meringue.",
}
]
}
];
await client.sendListMenu(message.from, 'Title', 'subTitle', 'Description', 'menu', list)
.then((result) => {
console.log('Result: ', result); //return object success
})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
});
}
}); } `
Result: { me: { id: { server: 'c.us', user: '5521966XXXXX', _serialized: '5521966XXXXXXX@c.us' }, displayName: null, verifiedName: null, searchName: null, pushname: null, notifyName: null, isBusiness: null, formattedUser: null, tag: '', stale: false, eurlStale: false, timestamp: 1690602853473 }, to: { fromMe: true, remote: { server: 'c.us', user: '5521975XXXXXX', _serialized: '5521975XXXXXX@c.us' }, id: 'NJAH1EJNXXXXXXXX', _serialized: 'true_55219XXXXXXX@c.us_NJAH1EXXXXXXXX' }, erro: false, text: null, status: 'OK' }
Tambem estou com o mesmo problema. Consigo enviar a lista retorna OK mas nao aparece na tela. No caso seria quando eu envio a Letra B
if (message.body.toLowerCase() === '/list') { ///envia uma lista sem simples. } else if (message.body.toLowerCase() === 'b') { // Opções dos botões // Construindo a mensagem com botões const list = [ { title: "Pasta", rows: [ { title: "Ravioli Lasagna", description: "Made with layers of frozen cheese", } ] }, { title: "Dessert", rows: [ { title: "Baked Ricotta Cake", description: "Sweets pecan baklava rolls", }, { title: "Lemon Meringue Pie", description: "Pastry filled with lemonand meringue.", } ] } ]; await client.sendListMenu(message.from, 'Title', 'subTitle', 'Description', 'menu', list) .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }
}); } `
Result: { me: { id: { server: 'c.us', user: '5521966XXXXX', _serialized: '5521966XXXXXXX@c.us' }, displayName: null, verifiedName: null, searchName: null, pushname: null, notifyName: null, isBusiness: null, formattedUser: null, tag: '', stale: false, eurlStale: false, timestamp: 1690602853473 }, to: { fromMe: true, remote: { server: 'c.us', user: '5521975XXXXXX', _serialized: '5521975XXXXXX@c.us' }, id: 'NJAH1EJNXXXXXXXX', _serialized: 'true_55219XXXXXXX@c.us_NJAH1EXXXXXXXX' }, erro: false, text: null, status: 'OK' }
talvez seu erro seja o que os demais também esta apresentando, tenta assim: troca "await client.sendListMenu" por "
`else if (message.body.toLowerCase() === 'b') {
const list = [..]
// envia a lista de menu
client.sendListMenu(message.from, 'Teste', 'subTitle', 'Descricao', 'ListMenu', list)
.then((result) => {
console.log('Resultado da Lista: ', result); //return object success
})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
});
}`
basicamente se vc fizer isso, vai aparecer conforme anexo
New Release: npm i venom-bot@5.1.0
We have support for Venom for just $15 per month, if you are interested, call our support via the link: https://web.whatsapp.com/send?phone=5561985290357
Tambem estou com o mesmo problema. Consigo enviar a lista retorna OK mas nao aparece na tela. No caso seria quando eu envio a Letra B
if (message.body.toLowerCase() === '/list') { ///envia uma lista sem simples. } else if (message.body.toLowerCase() === 'b') { // Opções dos botões // Construindo a mensagem com botões const list = [ { title: "Pasta", rows: [ { title: "Ravioli Lasagna", description: "Made with layers of frozen cheese", } ] }, { title: "Dessert", rows: [ { title: "Baked Ricotta Cake", description: "Sweets pecan baklava rolls", }, { title: "Lemon Meringue Pie", description: "Pastry filled with lemonand meringue.", } ] } ]; await client.sendListMenu(message.from, 'Title', 'subTitle', 'Description', 'menu', list) .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }
}); }
Result: { me: { id: { server: 'c.us', user: '5521966XXXXX', _serialized: '5521966XXXXXXX@c.us' }, displayName: null, verifiedName: null, searchName: null, pushname: null, notifyName: null, isBusiness: null, formattedUser: null, tag: '', stale: false, eurlStale: false, timestamp: 1690602853473 }, to: { fromMe: true, remote: { server: 'c.us', user: '5521975XXXXXX', _serialized: '5521975XXXXXX@c.us' }, id: 'NJAH1EJNXXXXXXXX', _serialized: 'true_55219XXXXXXX@c.us_NJAH1EXXXXXXXX' }, erro: false, text: null, status: 'OK' }`
talvez seu erro seja o que os demais também esta apresentando, tenta assim: troca "await client.sendListMenu" por "
`else if (message.body.toLowerCase() === 'b') { const list = [..] // envia a lista de menu client.sendListMenu(message.from, 'Teste', 'subTitle', 'Descricao', 'ListMenu', list) .then((result) => { console.log('Resultado da Lista: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }`
basicamente se vc fizer isso, vai aparecer conforme anexo
Aqui pra mim continua dando o mesmo erro do amigo de erro text null
Tambem estou com o mesmo problema. Consigo enviar a lista retorna OK mas nao aparece na tela. No caso seria quando eu envio a Letra B
if (message.body.toLowerCase() === '/list') { ///envia uma lista sem simples. } else if (message.body.toLowerCase() === 'b') { // Opções dos botões // Construindo a mensagem com botões const list = [ { title: "Pasta", rows: [ { title: "Ravioli Lasagna", description: "Made with layers of frozen cheese", } ] }, { title: "Dessert", rows: [ { title: "Baked Ricotta Cake", description: "Sweets pecan baklava rolls", }, { title: "Lemon Meringue Pie", description: "Pastry filled with lemonand meringue.", } ] } ]; await client.sendListMenu(message.from, 'Title', 'subTitle', 'Description', 'menu', list) .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }
}); }
`Result: { me: { id: { server: 'c.us', user: '5521966XXXXX', _serialized: '[5521966XXXXXXX@c.us](mailto:5521966XXXXXXX@c.us)' }, displayName: null, verifiedName: null, searchName: null, pushname: null, notifyName: null, isBusiness: null, formattedUser: null, tag: '', stale: false, eurlStale: false, timestamp: 1690602853473 }, to: { fromMe: true, remote: { server: 'c.us', user: '5521975XXXXXX', _serialized: '[5521975XXXXXX@c.us](mailto:5521975XXXXXX@c.us)' }, id: 'NJAH1EJNXXXXXXXX', _serialized: '[true_55219XXXXXXX@c.us_NJAH1EXXXXXXXX](mailto:true_55219XXXXXXX@c.us_NJAH1EXXXXXXXX)' }, erro: false, text: null, status: 'OK' }
talvez seu erro seja o que os demais também esta apresentando, tenta assim: troca "await client.sendListMenu" por "
`else if (message.body.toLowerCase() === 'b') { const list = [..] // envia a lista de menu client.sendListMenu(message.from, 'Teste', 'subTitle', 'Descricao', 'ListMenu', list) .then((result) => { console.log('Resultado da Lista: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }`
basicamente se vc fizer isso, vai aparecer conforme anexo
Aqui pra mim continua dando o mesmo erro do amigo de erro text null
posta o código de vocês que vou testar, mas pelo visto foi corrigido algumas coisas nas versões.
Were you able to resolve the error? I'm having the same problem with text: null
Were you able to resolve the error? I'm having the same problem with text: null
traduz ai, acabei de vê que a atualização do sistema, "barrou" o processo do sendListMenu! Dessa forma somente com os administradores do projeto, pra corrigir, no antigo funciona.
Were you able to resolve the error? I'm having the same problem with text: null
traduz ai, acabei de vê que a atualização do sistema, "barrou" o processo do sendListMenu! Dessa forma somente com os administradores do projeto, pra corrigir, no antigo funciona.
qual seria a versão do antigo? no caso os botões também não funciona?
Description
Even with an OK return in the "sendListMenu" function call, the list is not sent to the recipient.
Environment
Steps to Reproduce
"dev": " npx ts-node ./src/app.ts"
npm run dev
Log Output
Your Code
Additional context / Screenshot