Skip to content

Instantly share code, notes, and snippets.

@Kiranxer
Last active July 29, 2023 10:27
Show Gist options
  • Save Kiranxer/18ea442bcd6096d39b001cb441baf3eb to your computer and use it in GitHub Desktop.
Save Kiranxer/18ea442bcd6096d39b001cb441baf3eb to your computer and use it in GitHub Desktop.
const { inrl, getBuffer } = require('../lib/')
const image = 'https://i.imgur.com/vBmkzD3.jpg' //MAIN IMAGE URL HERE
const number = "17862222622";
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: "ᴋ-7",
body: "キランサーの個人ボット 🩷",
mediaType: 1,
thumbnail: thumb,
sourceUrl: "http://wa.me/17862222622?text=_ʜᴏɪ💎_"
}
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