wppconnect-team / wa-js

WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web
https://wppconnect.io/wa-js/
Apache License 2.0
325 stars 120 forks source link

Is it possible to tag everyone in group? #2006

Closed rayaa007 closed 4 days ago

rayaa007 commented 2 weeks ago

Is it possible to mention everyone without selecting one by one each user?

icleitoncosta commented 4 days ago

Yes, it would be something like this:

await WPP.chat.sendTextMessage("120363@g.us", 'Message text', {
    mentionedList: (await WPP.group.getParticipants('120363@g.us')).map(member => member.id.toString())
});