File size: 1,984 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
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}`);
    }
});