// code from goatstore // api: https://store.agi.bd const moment = require("moment-timezone"); // ═══════════════════════════════════════════════ // ⏳ DELAY FUNCTION // ═══════════════════════════════════════════════ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); // ═══════════════════════════════════════════════ // 🤖 INFO COMMAND // ═══════════════════════════════════════════════ module.exports = { config: { name: "info", version: "3.0.0", author: "ST | Sheikh Tamim", role: 2, countDown: 20, shortDescription: { en: "Owner & bot information" }, longDescription: { en: "Show detailed information about the bot, owner, uptime and socials" }, category: "owner", guide: { en: "{pn}" } }, // ═══════════════════════════════════════════════ // 🚀 ON START // ═══════════════════════════════════════════════ onStart: async function ({ message, event, api }) { let loadingMessage = null; try { // ═══════════════════════════════════════════ // 👑 OWNER INFO // ═══════════════════════════════════════════ const ownerName = "ᴍᴀɪsʜᴀ"; const ownerAge = "𝟐𝟐"; const ownerFB = "আ্ঁসো্ঁ ক্ঁট্ঁ খা্ঁই্ঁ🥵⎯⃝💦⎯⃝🤧⎯⃝🤭 ধ্ঁরা্ঁ প্ঁড়্ঁলে্ঁ-)সোনা 🤌(-𝙅𝙖𝙢𝙖𝙞•|•𝘽𝙤𝙬⎯͢⎯⃝🩵☺️🐰"; const ownerNumber = "𝟎𝟏𝟒𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟑𝟏"; const status = "𝐒𝐢𝐥𝐞𝐧𝐜𝐞 𝐢𝐬 𝐌𝐲 𝐀𝐭𝐭𝐢𝐭𝐮𝐝𝐞"; // ═══════════════════════════════════════════ // 🤖 BOT INFO // ═══════════════════════════════════════════ const botName = "ᴍᴇʜᴇᴅɪ ᴋʜᴀɴ"; const prefix = global.GoatBot?.config?.prefix || "."; const totalCommands = global.GoatBot?.commands?.size || 0; // ═══════════════════════════════════════════ // 🎬 VIDEO // ═══════════════════════════════════════════ const image = "https://files.catbox.moe/mdy4f6.mp4"; // ═══════════════════════════════════════════ // 🕒 DATE & TIME // ═══════════════════════════════════════════ const now = moment().tz("Asia/Dhaka"); const date = now.format("MMMM Do YYYY"); const time = now.format("h:mm:ss A"); // ═══════════════════════════════════════════ // ⚡ UPTIME // ═══════════════════════════════════════════ const uptime = process.uptime(); const days = Math.floor(uptime / 86400); const hours = Math.floor( (uptime % 86400) / 3600 ); const minutes = Math.floor( (uptime % 3600) / 60 ); const seconds = Math.floor(uptime % 60); const uptimeString = `${days}d ${hours}h ${minutes}m ${seconds}s`; // ═══════════════════════════════════════════ // ✨ LOADING ANIMATION // ═══════════════════════════════════════════ const loadingFrames = [ "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▱▱▱▱▱▱▱▱▱ 10%", "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▰▰▱▱▱▱▱▱▱ 30%", "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▰▰▰▰▱▱▱▱▱ 50%", "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▰▰▰▰▰▰▱▱▱ 70%", "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▰▰▰▰▰▰▰▰▱ 90%", "𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐈𝐧𝐟𝐨...\n▰▰▰▰▰▰▰▰▰▰ 100%" ]; // ═══════════════════════════════════════════ // 📩 SEND LOADING // ═══════════════════════════════════════════ try { loadingMessage = await message.reply( loadingFrames[0] ); } catch (error) { console.error( "[INFO] Loading send error:", error.message ); } // ═══════════════════════════════════════════ // 🔄 EDIT LOADING MESSAGE // ═══════════════════════════════════════════ if ( loadingMessage?.messageID ) { for ( let i = 1; i < loadingFrames.length; i++ ) { await sleep(700); try { await api.editMessage( loadingFrames[i], loadingMessage.messageID ); } catch (error) { console.log( "[INFO] Loading edit error:", error.message ); } } // 100% একটু দেখাবে await sleep(500); // ═════════════════════════════════════════ // 🗑️ DELETE ONLY LOADING MESSAGE // ═════════════════════════════════════════ try { await api.unsendMessage( loadingMessage.messageID ); } catch {} loadingMessage = null; } // ═══════════════════════════════════════════ // 💎 FINAL INFO TEXT // ═══════════════════════════════════════════ const infoText = ` ╔═《 ✨ 𝗢𝗪𝗡𝗘𝗥 & 𝗕𝗢𝗧 𝗜𝗡𝗙𝗢 ✨ 》═╗ ⭓ 🤖 𝗕𝗼𝘁 𝗡𝗮𝗺𝗲 : 『 ${botName} 』 ⭓ ☄️ 𝗣𝗿𝗲𝗳𝗶𝘅 : 『 ${prefix} 』 ⭓ 🧠 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 : 『 ${totalCommands} 』 ⭓ ⚡ 𝗨𝗽𝘁𝗶𝗺𝗲 : 『 ${uptimeString} 』 ⭓ 🗓️ 𝗗𝗮𝘁𝗲 : 『 ${date} 』 ⭓ ⏰ 𝗧𝗶𝗺𝗲 : 『 ${time} 』 ⭓ 👑 𝗢𝘄𝗻𝗲𝗿 : 『 ${ownerName} 』 ⭓ 🎂 𝗔𝗴𝗲 : 『 ${ownerAge} 』 ⭓ ❤️ 𝗦𝘁𝗮𝘁𝘂𝘀 : 『 ${status} 』 ⭓ 📱 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽 : 『 ${ownerNumber} 』 ⭓ 🌐 𝗙𝗮𝗰𝗲𝗯𝗼𝗼𝗸 : 『 ${ownerFB} 』 ╚══════════════════════════╝ `; // ═══════════════════════════════════════════ // 📤 TEXT + VIDEO // একই MESSAGE-এ পাঠানো হবে // ═══════════════════════════════════════════ const finalMessage = await message.reply({ body: infoText, attachment: await global.utils.getStreamFromURL( image ) }); // ═══════════════════════════════════════════ // 🗑️ AUTO DELETE AFTER 30 SECONDS // ═══════════════════════════════════════════ if ( finalMessage?.messageID ) { setTimeout(() => { api .unsendMessage( finalMessage.messageID ) .catch(() => {}); }, 30000); } return finalMessage; } catch (error) { console.error( "[INFO ERROR]", error.stack || error.message || error ); // ═══════════════════════════════════════════ // 🗑️ ERROR হলে LOADING MESSAGE DELETE // ═══════════════════════════════════════════ if ( loadingMessage?.messageID ) { try { await api.unsendMessage( loadingMessage.messageID ); } catch {} } // ═══════════════════════════════════════════ // ❌ ERROR MESSAGE // ═══════════════════════════════════════════ try { return await message.reply( "❌ Info command চালাতে সমস্যা হয়েছে। আবার চেষ্টা করুন।" ); } catch {} } } };