// code from goatstore // api: https://store.agi.bd module.exports = { config: { name: "up", version: "1.1.0", author: "Mehedi-saito", countDown: 5, role: 0, shortDescription: { en: "Check bot uptime with video" }, longDescription: { en: "Shows bot uptime, server info and sends a video" }, category: "system", guide: { en: "{pn}" } }, onStart: async function ({ message }) { const os = require("os"); // Bot Uptime const uptime = process.uptime(); const days = Math.floor(uptime / (60 * 60 * 24)); const hours = Math.floor((uptime % (60 * 60 * 24)) / (60 * 60)); const minutes = Math.floor((uptime % (60 * 60)) / 60); const seconds = Math.floor(uptime % 60); let uptimeText = ""; if (days > 0) uptimeText += `${days}d `; if (hours > 0) uptimeText += `${hours}h `; if (minutes > 0) uptimeText += `${minutes}m `; uptimeText += `${seconds}s`; // Server / System Info const serverName = os.hostname(); const platform = os.platform(); const arch = os.arch(); const nodeVersion = process.version; const totalMem = (os.totalmem() / 1024 / 1024 / 1024).toFixed(2); const freeMem = (os.freemem() / 1024 / 1024 / 1024).toFixed(2); const usedMem = (totalMem - freeMem).toFixed(2); const cpuCores = os.cpus().length; const videoUrl = "https://drive.google.com/uc?export=download&id=1tUFHtX_CpL-2jTbKDHet58vXOQlFYiK3"; const msg = `╭────「 𝗕𝗢𝗧 𝗨𝗣𝗧𝗜𝗠𝗘 」────╮ │ │ ⏱ 𝗨𝗽𝘁𝗶𝗺𝗲 : ${uptimeText} │ 🖥 𝗦𝗲𝗿𝘃𝗲𝗿 : ${serverName} │ 💻 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺 : \( {platform} ( \){arch}) │ 🧠 𝗖𝗣𝗨 : ${cpuCores} Cores │ 💾 𝗠𝗲𝗺𝗼𝗿𝘆 : ${usedMem} / ${totalMem} GB │ 🟢 𝗡𝗼𝗱𝗲 : ${nodeVersion} │ 👑 𝗔𝘂𝘁𝗵𝗼𝗿 : Mehedi-saito │ ╰─────────────────────────╯`; try { const attachment = await global.utils.getStreamFromURL(videoUrl); return message.reply({ body: msg, attachment: attachment }); } catch (err) { return message.reply(msg + `\n\n⚠️ Video load failed.`); } } };