mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
feat: Pin and unpin Chats (#166)
* Added Pinning - chat.pin() to pin - chat.unpin() to unpin Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This commit is contained in:
@@ -166,9 +166,12 @@ client.on('message', async msg => {
|
||||
} else {
|
||||
msg.reply('I can only delete my own messages');
|
||||
}
|
||||
} else if (msg.body === '!pin') {
|
||||
const chat = await msg.getChat();
|
||||
await chat.pin();
|
||||
} else if (msg.body === '!archive') {
|
||||
const chat = await msg.getChat();
|
||||
chat.archive();
|
||||
await chat.archive();
|
||||
} else if (msg.body === '!mute') {
|
||||
const chat = await msg.getChat();
|
||||
// mute the chat for 20 seconds
|
||||
|
||||
Reference in New Issue
Block a user