Spaces:
Sleeping
Sleeping
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}`);
}
}); |