Spaces:
Runtime error
Runtime error
File size: 2,423 Bytes
8d8b0ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
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}`);
}
});
|