const { cmd, commands } = require('../command'); const os = require("os"); const { runtime } = require('../lib/functions'); cmd({ pattern: "alive", alias: ["status", "runtime", "uptime"], desc: "Check uptime and system status", category: "main", react: "πŸ“Ÿ", filename: __filename }, async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply }) => { try { // Generate system status message const status = `╭━━〔 *SUBZERO MD* γ€•β”β”β”ˆβŠ· β”ƒβ—ˆβ•­β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€Β·ΰΉ β”ƒβ—ˆβ”ƒβ€’ *⏳Uptime*: ${runtime(process.uptime())} β”ƒβ—ˆβ”ƒβ€’ *πŸ“Ÿ Ram usage*: ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${(os.totalmem() / 1024 / 1024).toFixed(2)}MB β”ƒβ—ˆβ”ƒβ€’ *βš™οΈ HostName*: ${os.hostname()} β”ƒβ—ˆβ”ƒβ€’ *πŸ‘¨β€πŸ’» Owner*: Mr Frank β”ƒβ—ˆβ”ƒβ€’ *πŸ“‚ Version*: 1.0.3 β”ƒβ—ˆβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ· β•°β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”ˆβŠ· > Β© α΄˜α΄α΄‘α΄‡Κ€α΄‡α΄… ʙʏ sα΄œΚ™α΄’α΄‡Κ€α΄ ᴍᴅ`; // Send the status message with an image await conn.sendMessage(from, { image: { url: `https://i.postimg.cc/yNf7rQFw/prn.jpg` }, // Image URL caption: status, contextInfo: { mentionedJid: [m.sender], forwardingScore: 999, isForwarded: true, forwardedNewsletterMessageInfo: { newsletterJid: '120363304325601080@newsletter', newsletterName: 'γ€Ž π’π”ππ™π„π‘πŽ πŒπƒ 』', serverMessageId: 143 } } }, { quoted: mek }); } catch (e) { console.error("Error in alive command:", e); reply(`An error occurred: ${e.message}`); } });