Encrypto-27-AI-BOT / plugins /main-owner.js
Encrypto27
audio fix
2256317
raw
history blame
2.63 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://i.ibb.co/hx0rGm5/Encrypto.webp' }, // Image URL from your request
caption: `╭━━〔 *ENCRYPTO-27 AI* γ€•β”β”β”ˆβŠ·
β”ƒβ—ˆβ•­β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€Β·ΰΉ
β”ƒβ—ˆβ”ƒβ€’ *Here is the owner details*
β”ƒβ—ˆβ”ƒβ€’ *Name* - ${ownerName}
β”ƒβ—ˆβ”ƒβ€’ *Number* ${ownerNumber}
β”ƒβ—ˆβ”ƒβ€’ *Version*: 3.4
β”ƒβ—ˆβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ·
β•°β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ·
> Β© α΄˜α΄α΄‘α΄‡Κ€α΄‡α΄… ʙʏ π™³πš„π™³π™°πš‚`, // Display the owner's details
contextInfo: {
mentionedJid: [`${ownerNumber.replace('+', '')}@s.whatsapp.net`],
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterJid: '120363304325601080@newsletter',
newsletterName: 'Dudas',
serverMessageId: 143
}
}
}, { quoted: mek });
// Send audio as per your request
await conn.sendMessage(from, {
audio: { url: 'https://github.com/mrfrank-ofc/SUBZERO-MD-DATABASE/raw/refs/heads/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}`);
}
});