Closed felipedks closed 4 years ago
async function start(client){
client.onMessage((message) => {
if (message.body === 'Hi') {
await client.sendText(message.from, 'Welcome Venom 🕷');
}
});
}
use the async and wait
The error continues.
If possible i installed wrong?
I need change the name in json file to "name": "venombot",
without the -
Because before i get error "npm ERR! Refusing to install package with name"
I try here with many options, and every ways i go to this same error i talk about before ;/
npm install venom-bot is correct
I try this: https://github.com/pedroslopez/whatsapp-web.js And works here.
But vennon not working. I get the same error every time. You have another solution? Because i'm develloping a project based on sulla, and i think venom is the best way to use without sulla.
Você é BR? To digitando em inglês atoa? rs
sim, atualize para a versão 1.0.2 e veja se funciona
Executei ele e apareceu a mensagem sobre a atualização para versão 1.0.3
Então executei o código npm update @s2click/venom
Mas ele continuou exibindo a mensagem de que preciso atualizar, então não sei se atualizou. Por garantia, tentei reinstalar ele, atualizar, etc. Mas em todos os casos, continuou aparecendo a mensagem abaixo
┌────────────────────────────────────────────────────┐ │ │ │ There is a new version of Venom 1.0.0 ➜ 1.0.3 │ │ Update your package by running: │ │ │ │ > npm update @s2click/venom │ │ │ └────────────────────────────────────────────────────┘ For more info visit: https://github.com/s2click/venom/blob/master/UPDATES.md
Tentei aceesar esse link também e deu como invalido.
Tentei executar o codigo com e sem o async, e não foi também.
Criei uma instancia no visual studio code, institulei de xx.js e coloquei o codigo do venom dentro. Ele funcionou. Estranho. Direto pelo node não vai, mas pelo VC foi.
e que estava errado arrumamos o comando e npm i venom-bot
Im start the node.js and type the code
After this, the script run, and show me the QR code. I scan, get sucess message, and error in next.
See: