client.on('message_create', message => {
console.log(message.body);
if (message.body === '!ping') {
// send back "pong" to the chat the message was sent in
client.sendMessage(message.from, 'pong:ping_pong:!!');
}
if (message.body === '!info') {
client.sendMessage(message.from, '*------------------------------------------------*\n*RaposoTech Whatsapp - Respostas e Interações Automáticas*\n_RaposoTech Whatsapp - Auto Interactions and Responses_\n*v*(*0.0.1b*)\nDesenvolvido por *Vitor Morais*\nDeveloped by *Vitor Morais*\n*------------------------------------------------*');
}
if (message.body === '@everyone'){
const chat = message.getChat();
var mention = [];
var text = '';
for (var participant of chat.participants) {
mention.push(`${participant.id.user}@c.us`);
text += `@${participant.id.user} `;
client.sendMessage(message.from, text);
}
}
});```
Someone know a way to easily mention all group members ( if possible, without multiple mentions, just one )
#/@everyone on chatbot
4 messages · Page 1 of 1 (latest)