New and reply messages not call .onMessage
See original GitHub issueDescription
I develop a large automation bot and after a few versions I notice that new messages do not call the .onMessage method.
Run a test with the code from README.md and I confirmed that it is something related to venom.
I started to investigate, but I’ve been reading the source code for 4 hours and I haven’t found where the possible error could be.
Environment
- Venom version(s): 4.3.5
- Browser: Firefox 107, Chrome 107
- OS: OSX 12.14, Ubuntu 20
- Node version: Node 16, Node 18
Your Code
As the README.MD
const venom = require("venom-bot");
venom
.create({
session: "dev", //name of session
multidevice: true, // for version not multidevice use false.(default: true)
})
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
});
function start(client) {
client.onMessage((message) => {
console.log({ message });
});
}
Issue Analytics
- State:
- Created 10 months ago
- Reactions:4
- Comments:30 (3 by maintainers)
Top Results From Across the Web
onMessage of MessageListener class is not called in groovy
I got this fixed, i was importing the wrong library. I had to use JMS Listerner library import javax.jms.MessageListener instead of Groovy Message...
Read more >OnMessage() - Syntax & Usage - AutoHotkey
The OnMessage function specifies a function or function object to call automatically when the script receives the specified message.
Read more >runtime.onMessage - Mozilla - MDN Web Docs
A function to call, at most once, to send a response to the message . The function takes a single argument, which may...
Read more >If you have an issue with Messages or FaceTime after setting ...
After setting up your iPhone, you might experience one or more of the following issues: You can't receive iMessages or FaceTime calls.
Read more >What does "Call- No answer" on message history mean?
This message means that the account owner made an outbound call but the receiver did not respond or get the call.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
kkkkkkkkkkk é brasileiro tbm e eu escrevendo em ingles kkkkk
@guh0rzd try https://github.com/orkestral/venom/issues/2023#issuecomment-1326539461