-
-
Save itzmesuhail143/9af814ed0e021946e632b0f2b7005239 to your computer and use it in GitHub Desktop.
A customizable owner plugin allows you to easily modify and display the bot owner's contact details....!
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 { Module } = require('../main'); | |
const config = require('../config'); | |
const axios = require('axios'); | |
const isPrivateBot = config.MODE !== 'public'; | |
// Owner command for Raganork-MD style | |
Module({ | |
pattern: 'owner', | |
fromMe: isPrivateBot, | |
desc: 'Bot Owner', | |
type: 'user' | |
}, async (message, match) => { | |
try { | |
const name = 'ππππππ π¦π’π'; | |
const title = 'βββγ ππππππ-πππ-ππΏ γβββ'; | |
const number = '916374437144'; | |
const body = 'βΝ’βββ―βΝ’πΊαͺ΅πΌΝ’π―π¨π°π³αͺ΅π πΊαͺ΅π¬πΉαβΝ’ ββββ³'; | |
const image = "https://i.imgur.com/6uLmYzw.jpeg"; | |
const thumbnailUrl = 'ig.me/__s_u_h_a_i_l__s_u_h_a_i_l__'; | |
// Thumbnail as buffer if supported, else null | |
let thumbnailBuffer = null; | |
try { | |
const imgRes = await axios.get(image, { responseType: 'arraybuffer' }); | |
thumbnailBuffer = Buffer.from(imgRes.data, 'binary'); | |
} catch (e) {} | |
// vCard format | |
const vcard = `BEGIN:VCARD | |
VERSION:3.0 | |
FN:${name} | |
TEL;type=CELL;type=VOICE;waid=${number}:${number} | |
END:VCARD`; | |
await message.client.sendMessage(message.jid, { | |
contacts: { | |
contacts: [{ vcard }] | |
}, | |
contextInfo: { | |
externalAdReply: { | |
title: title, | |
body: body, | |
thumbnailUrl: thumbnailUrl, | |
mediaUrl: thumbnailUrl, | |
mediaType: 1, | |
showAdAttribution: false, | |
renderLargerThumbnail: false, | |
thumbnail: thumbnailBuffer | |
} | |
} | |
}); | |
} catch (error) { | |
console.error('Error occurred:', error); | |
await message.client.sendMessage(message.jid, { text: 'Error occurred while executing the command.' }); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment