SUBZERO-MD / plugins /main-owner.js
mrfrank-ofc's picture
Upload 63 files
8d8b0ad verified
raw
history blame
2.42 kB
const { cmd } = require('../command');
const config = require('../config');
cmd({
pattern: "owner",
react: "βœ…",
desc: "Get owner number",
category: "main",
filename: __filename
},
async (conn, mek, m, { from }) => {
try {
const ownerNumber = config.OWNER_NUMBER; // Fetch owner number from config
const ownerName = config.OWNER_NAME; // Fetch owner name from config
const vcard = 'BEGIN:VCARD\n' +
'VERSION:3.0\n' +
`FN:${ownerName}\n` +
`TEL;type=CELL;type=VOICE;waid=${ownerNumber.replace('+', '')}:${ownerNumber}\n` +
'END:VCARD';
// Send the vCard
const sentVCard = await conn.sendMessage(from, {
contacts: {
displayName: ownerName,
contacts: [{ vcard }]
}
});
// Send the owner contact message with image and audio
await conn.sendMessage(from, {
image: { url: 'https://files.catbox.moe/149k8x.jpg' }, // Image URL from your request
caption: `╭━━〔 *SUBZERO MD* γ€•β”β”β”ˆβŠ·
β”ƒβ—ˆβ•­β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€Β·ΰΉ
β”ƒβ—ˆβ”ƒβ€’ *Here is the owner details*
β”ƒβ—ˆβ”ƒβ€’ *Name* - ${ownerName}
β”ƒβ—ˆβ”ƒβ€’ *Number* ${ownerNumber}
β”ƒβ—ˆβ”ƒβ€’ *Version*: 2.0.0
β”ƒβ—ˆβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ·
β•°β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ·
> Β© α΄˜α΄α΄‘α΄‡Κ€α΄‡α΄… ʙʏ ᴍʀ κœ°Κ€α΄€Ι΄α΄‹`, // Display the owner's details
contextInfo: {
mentionedJid: [`${ownerNumber.replace('+', '')}@s.whatsapp.net`],
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterJid: '120363304325601080@newsletter',
newsletterName: 'Mr Frank OFC',
serverMessageId: 143
}
}
}, { quoted: mek });
// Send audio as per your request
await conn.sendMessage(from, {
audio: { url: 'https://github.com/mrfrank-ofc/SUBZERO-MD-DATABASE/blob/main/audios/subzero-menu.mp3' }, // Audio URL
mimetype: 'audio/mp4',
ptt: true
}, { quoted: mek });
} catch (error) {
console.error(error);
reply(`An error occurred: ${error.message}`);
}
});