Skip to content

Instantly share code, notes, and snippets.

@itzmesuhail143
Forked from xeonrag/Owner.js
Last active July 27, 2025 12:04
Show Gist options
  • Save itzmesuhail143/9af814ed0e021946e632b0f2b7005239 to your computer and use it in GitHub Desktop.
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....!
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