Baileys
Baileys copied to clipboard
Pin messages
I've tried the code from the baileys documentation, but I only get the response ID, and nothing happens
Someone can help me?🗿
Someone can help me?🗿
Try to use in code
Seseorang dapat membantu saya?🗿
Coba gunakan dalam kode
I've tried but it still doesn't work
i try this code, and nothing happen.. any solution?
i try this code, and nothing happen.. any solution?
Wait for Baileys update
i try this code, and nothing happen.. any solution?
that's not a code for pin messages, it's for pin chat
i try this code, and nothing happen.. any solution?
that's not a code for pin messages, it's for pin chat
await sock.chatModify({
pin: true // or false
to unpin
},
'[email protected]')
The the code use m.chat or m.from instread of chat id
There is only a function to pin chats for now. As for pinning messages, considering it's a new feature, if I have some free time, I will create a pull request for it..
i try this code, and nothing happen.. any solution?
that's not a code for pin messages, it's for pin chat
await sock.chatModify({ pin: true // or
false
to unpin }, '[email protected]')The the code use m.chat or m.from instread of chat id
sorry, for my mistake
There is only a function to pin chats for now. As for pinning messages, considering it's a new feature, if I have some free time, I will create a pull request for it..
thank you.. I'm glad to hear that
https://github.com/WhiskeySockets/Baileys/pull/545
Please try this PR. i dont have much time to test, hopefully someone can help to complete
i try this code, and nothing happen.. any solution?
that's not a code for pin messages, it's for pin chat
await sock.chatModify({ pin: true // or
false
to unpin }, '[email protected]')The the code use m.chat or m.from instread of chat id
Dude This code is for pinning the chat
https://github.com/WhiskeySockets/Baileys/pull/545
Please try this PR. i dont have much time to test, hopefully someone can help to complete
I just test, your code work but just little bit problem is pinned message not visible on Mobile Application 🙃, but it pinned on WhatsApp Web Version
let templategenerate= await generateWAMessageFromContent(from, proto.Message.fromObject({pinInChatMessage: { key: message.key, type: 1, senderTimestampMs: new Date().getTime() / 1000 }}), {})
let templatenew = { messageContextInfo: { messageAddOnDurationInSecs: 604800 }, ...templategenerate.message }
await conn.relayMessage(from, templatenew, { messageId: templategenerate.key.id })
It only works on WhatsApp Web.