Skip to content

Instantly share code, notes, and snippets.

@lufa-official
Last active August 17, 2023 10:12
Show Gist options
  • Save lufa-official/38b1fc45ac2830610c98fb99dc4a5ab6 to your computer and use it in GitHub Desktop.
Save lufa-official/38b1fc45ac2830610c98fb99dc4a5ab6 to your computer and use it in GitHub Desktop.
const { inrl, getBuffer } = require('../lib/')
const image = 'https://imagizer.imageshack.com/img924/6725/JTVUAp.jpg' //MAIN IMAGE URL HERE
const number = "94753334890";
const ownerName = "𝐗𝐗𝐗 么 𝐋𝐔𝐅𝐀"
inrl(
{
pattern: 'owner ?(.*)',
fromMe: false,
desc: 'send owner vcard',
type: 'misc',
}, async (message) => {
const thumb = await getBuffer(image)
const vcard = 'BEGIN:VCARD\n' // metadata of the contact card
+ 'VERSION:3.0\n' + 'FN:'+ownerName+'\n' // full name
+ 'ORG:'+ownerName+';\n' // the organization of the contact
+ 'TEL;type=CELL;type=VOICE;waid='+number+':'+number+'\n' // WhatsApp ID + phone number
+ 'END:VCARD'
opt = {}
opt.linkPreview = {
renderLargerThumbnail: false,
showAdAttribution: true,
title: "ΙͺΝ₯α΄›Ν­sα·€ ᴍͫᴇ̀ 𝐗𝐗𝐗 么 𝐋𝐔𝐅𝐀",
body: "α΄„ΚŸΙͺα΄„α΄‹ Κœα΄‡Κ€α΄‡ ᴛᴏ α΄³α΅‰α΅—πŸ«‚ !",
mediaType: 1,
thumbnail: thumb,
sourceUrl: "http://wa.me/94753334890?text=_៚Yᴏᴜɴɒ+Lα΄œκœ°α΄€+πŸͺ„_"
}
let content = { contacts :{
displayName: ownerName,
contacts: [{
vcard
}],
}
}
return await message.forwardMessage(message.from,content, opt)
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment