Skip to content

Instantly share code, notes, and snippets.

@xeonrag

xeonrag/Owner.js Secret

Last active October 29, 2025 09:16
Show Gist options
  • Save xeonrag/d3fe25d44ca7c03e9f911b70ffec8a1c to your computer and use it in GitHub Desktop.
Save xeonrag/d3fe25d44ca7c03e9f911b70ffec8a1c 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';
/*===================================================================================
████████ EDITABLE SECTION ████████
Only change the values between these lines!
===================================================================================*/
const OWNER_DETAILS = {
name: 'Xeon',
title: 'Enjoy',
number: '91xxxxxxxxxx',
body: 'set akkiko',
image: "https://i.ibb.co/PZdr7GK6/temp.jpg",
thumbnailUrl: 'https://gist.github.com/'
};
/*===================================================================================
████████ END OF EDITABLE SECTION ████████
Do NOT modify anything below this point!
===================================================================================*/
// Owner command for Raganork-MD style
Module({
pattern: 'owner',
fromMe: isPrivateBot,
desc: 'Bot Owner',
type: 'user'
}, async (message, match) => {
try {
// Thumbnail as buffer if supported, else null
let thumbnailBuffer = null;
try {
const imgRes = await axios.get(OWNER_DETAILS.image, { responseType: 'arraybuffer' });
thumbnailBuffer = Buffer.from(imgRes.data, 'binary');
} catch (e) {}
// vCard format
const vcard = `BEGIN:VCARD
VERSION:3.0
FN:${OWNER_DETAILS.name}
TEL;type=CELL;type=VOICE;waid=${OWNER_DETAILS.number}:${OWNER_DETAILS.number}
END:VCARD`;
await message.client.sendMessage(message.jid, {
contacts: {
contacts: [{ vcard }]
},
contextInfo: {
externalAdReply: {
title: OWNER_DETAILS.title,
body: OWNER_DETAILS.body,
thumbnailUrl: OWNER_DETAILS.thumbnailUrl,
mediaUrl: OWNER_DETAILS.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