Function to send html view via baileys👈
async function htmlGoon(sock, jid, html) {
const msg = generateWAMessageFromContent(jid, {
botForwardedMessage: {
message: {
richResponseMessage: {
messageType: 1,
unifiedResponse: {
data: Buffer.from(
JSON.stringify({
__typename: "GenAIUnifiedResponse",
response_id: crypto.randomUUID(),
sections: [
{
__typename: "GenAIUnifiedResponseSection",
view_model: {
__typename: "GenAISingleLayoutViewModel",
primitive: {
__typename: "FOAHtmlPrimitiveDemoDONOTUSE",
trusted_sources: [],
payload: html.trim()
}
}
}
]
})
).toString("base64")
},
contextInfo: {
isForwarded: true,
forwardOrigin: 4
}
}
}
}
}, {})
return sock.relayMessage(jid, msg.message, {messageId: msg.key.id});
}
Follow our channel for more:
t.me/TheSatanicMirror
Van Snøwi · 7 · 668 · PostFunction to send html view via baileys👈
30 August 2026Nearby in the feed
Kthis message
K