-
-
Save Corex24/cb4353b3f0b31048d736b6a584947c56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { bot, getBuffer, genThumbnail, jidToNum } = require('../lib/') | |
| const url = 'https://files.catbox.moe/58v2yy.jpeg' | |
| 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: '๐ถ๐ฉ๐ ๐ฏ๐ธ ๐ฅ๐ฎ๐๐จ๐ฉ๐ฎ๐ is the Boss', | |
| }, | |
| }, | |
| }, | |
| }, | |
| 'contacts' | |
| ) | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment