#Who Seen My Msg in Goup ?
56 messages · Page 1 of 1 (latest)
I think this can give you an idea of how to do it #suggestions message
Or you can try something like this:
let chat = await client.getChatById(chatId);
let messages = await chat.fetchMessages({limit: 100});
for (let message of messages){
if (message.fromMe == true){
console.log (message.body);
console.log(message.getInfo());
}
}
@mystic plover where using this code in example.js?
Wherever you need to catch the information you need, or you can create an endpoint to do that
I think this will help you to understand the problem https://pt.stackoverflow.com/questions/432626/problema-com-promisse-retorna-promise-pending
just use await
undefined
can you send the code?
yes
Try this ```javascript
let msgInfo = await message.getInfo();
console.log(msgInfo);
@mystic plover
The same problem
try message.getInfo().then(data->console.log(data))
Are you sure that all messages was saw for others people?
error code
This is the docs for this method https://docs.wwebjs.dev/Message.html#getInfo
I want get Info messge who read or delivery
This should return all informations about the message
How ?
It should work ```javascript
let msgInfo = await message.getInfo();
console.log(msgInfo);
but this code output undefined
I see but accordingly with the docs it should work
why Can you try it ?
Try on more thing ```js
message.getInfo().then(data => console.log(data));
@inner eagle @mystic plover
Maybe is a problem with the lib
Ok Give me the lib
@mystic plover @inner eagle
@mystic plover ?
Unfortunately, there's nothing I can help anymore with
Thank you for trying. You have made the best effort for me, a thousand thanks
Not at all
@mystic plover But if you have a copy and this feature is working, can you please give me
Seeing the lib's github, I think it doesn't work for a while
Is there another way?
You can try use the event ACK, something like ```js
client.on('message_ack', (msg, ack) => {
/*
== ACK VALUES ==
ACK_ERROR: -1
ACK_PENDING: 0
ACK_SERVER: 1
ACK_DEVICE: 2
ACK_READ: 3
ACK_PLAYED: 4
*/
if(ack == 3) {
// The message was read
}
});
But it will work for new message
I want to check the end-of-day message, for example, who read it, who didn't read it, who received it, and so on
I understand, but this can be another way to do, you May create a json with the information to save the data
All right, I use this method and save it to a file, but I want to know who read it, the phone number and other information
I don't know what in the msg object, maybe there's the information you want
but this event not work on Group
Well, now I have no ideas
Can you try it ?
You mean running the code on my pc?
yeas
ok can you give me your whatsapp phone?