Skip to content

Instantly share code, notes, and snippets.

@lyfe00011
Last active November 14, 2025 22:58
Show Gist options
  • Select an option

  • Save lyfe00011/d38603fd734aab9e4544c015e4d13a84 to your computer and use it in GitHub Desktop.

Select an option

Save lyfe00011/d38603fd734aab9e4544c015e4d13a84 to your computer and use it in GitHub Desktop.
const { bot, getBuffer, genThumbnail, jidToNum } = require('../lib/')
const url = 'https://i.pinimg.com/236x/16/22/2a/16222a14b08235dd1d795e4152a8f8d5.jpg'
bot(
{
pattern: 'owner ?(.*)',
fromMe: true,
desc: 'contact',
type: 'whatsapp',
},
async (message, match) => {
const thumbnail = await genThumbnail(
await (
await getBuffer(url)
).buffer
)
const owner = jidToNum(message.participant)
const name = message.pushName
const vcard =
'BEGIN:VCARD\n' +
'VERSION:3.0\n' +
`FN:${name}\n` +
`ORG:${name};\n` +
`TEL;type=CELL;type=VOICE;waid=${owner}:+${owner}\n` +
'END:VCARD'
await message.send(
{
displayName: `${name}`,
contacts: [{ vcard }],
},
{
linkPreview: {
head: `${name}`,
body: '',
mediaType: 2,
thumbnail: thumbnail,
showAdAttribution: true,
sourceUrl: `https://wa.me/${owner}`,
},
quoted: {
key: {
fromMe: false,
participant: '[email protected]',
remoteJid: 'status@broadcast',
},
message: {
imageMessage: {
jpegThumbnail: thumbnail,
caption: 'Im the one and only Owner',
},
},
},
},
'contacts'
)
}
)
@Haendel095
Copy link

Haendel

@hive-sammie
Copy link

Please when I edited it is still showing this code, what should I do

@brie2021
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment