Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

how to mentions in templateMessage ??

Open Barqah-Xiex opened this issue 1 year ago • 9 comments

How to mentions in templateMessage My code:

const templateButtons = [
    {index: 1, urlButton: {displayText: '⭐ Star Baileys on GitHub!', url: 'https://github.com/adiwajshing/Baileys'}},
    {index: 2, callButton: {displayText: 'Call me!', phoneNumber: '+1 (234) 5678-901'}},
    {index: 3, quickReplyButton: {displayText: 'This is a reply, just like normal buttons!', id: 'id-like-buttons-message'}},
]

const templateMessage = {
    text: "Hi @628979059392",
    footer: 'Hello World',
    templateButtons: templateButtons,
    mentions: ["[email protected]"]
}

sock.sendMessage(id, templateMessage)

But unfortunately it still doesn't work the person mentioned there is not mentioned by templateMessage

Barqah-Xiex avatar Jul 24 '22 09:07 Barqah-Xiex

con sender

marru452 avatar Jul 24 '22 16:07 marru452

con sender

what does con sender mean?

Barqah-Xiex avatar Jul 25 '22 01:07 Barqah-Xiex

I think you can't mentions someone in templateMessages

zennn08 avatar Jul 25 '22 06:07 zennn08

wht version of baileys are you using?

nstar-y avatar Jul 25 '22 07:07 nstar-y

Já ocorreu isso comigo. Não consegui mencionar com templateMessage

undefined-60 avatar Jul 26 '22 21:07 undefined-60

wht version of baileys are you using?

Github version:

npm i https://github.com/adiwajshing/Baileys

Barqah-Xiex avatar Jul 27 '22 02:07 Barqah-Xiex

Based on what I've tested, you can't tag/mention and reply someone using templateMessages.

edit: but you can get the name of the sender

Vynn-SOLO avatar Jul 28 '22 13:07 Vynn-SOLO

not possible, as the template message itself can't render it (as @Vynn-SOLO said)

i'd say close the issue

PurpShell avatar Aug 01 '22 12:08 PurpShell

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Aug 08 '22 03:08 github-actions[bot]