feat: Mention users, get user number from Contact model
This commit is contained in:
parent
ef80f966ea
commit
5616613807
1 changed files with 18 additions and 2 deletions
|
|
@ -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]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue