mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
[+] New message_create event that is fired on all message creations.
A new property "fromMe" has also been added to messages. Close #8
This commit is contained in:
@@ -84,6 +84,13 @@ client.on('message', async msg => {
|
||||
}
|
||||
});
|
||||
|
||||
client.on('message_create', (msg) => {
|
||||
// Fired on all message creations, including your own
|
||||
if(msg.fromMe) {
|
||||
// do stuff here
|
||||
}
|
||||
})
|
||||
|
||||
client.on('disconnected', () => {
|
||||
console.log('Client was logged out');
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user