feat: Mention users, get user number from Contact model

This commit is contained in:
Pedro Lopez
2020-02-08 03:19:51 -04:00
parent ef80f966ea
commit 5616613807
5 changed files with 18 additions and 2 deletions

View File

@@ -131,6 +131,12 @@ client.on('message', async msg => {
const newStatus = msg.body.split(' ')[1];
await client.setStatus(newStatus);
msg.reply(`Status was updated to *${newStatus}*`);
} else if (msg.body == '!mention') {
const contact = await msg.getContact();
const chat = await msg.getChat();
chat.sendMessage(`Hi @${contact.number}!`, {
mentions: [contact]
});
}
});