const fs = require("fs-extra"); const request = require("request"); const path = require("path"); const { utils } = global; module.exports = { config: { name: "owner", version: "2.0", author: "HR ID OY", role: 0, shortDescription: "Owner information with animation", category: "Utility", guide: { en: "owner" } }, onStart: async function ({ api, event }) { // ===== LOADING ANIMATION ===== const loadingStages = [ "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\n▰▱▱▱▱▱▱▱▱▱ 10%", "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\n▰▰▰▱▱▱▱▱▱▱ 30%", "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\n▰▰▰▰▰▱▱▱▱▱ 50%", "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\n▰▰▰▰▰▰▰▱▱▱ 70%", "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\nā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–± 90%", "š‹šØšššš¢š§š  šŽš°š§šžš« šˆš§šŸšØ...\nā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–°ā–° 100%" ]; const loadingMsg = await api.sendMessage(loadingStages[0], event.threadID); for (let i = 1; i < loadingStages.length; i++) { await new Promise(r => setTimeout(r, 700)); await api.editMessage(loadingStages[i], loadingMsg.messageID); } setTimeout(() => { api.unsendMessage(loadingMsg.messageID); }, 1000); // ===== STATS ===== const ping = Date.now() - event.timestamp; const uptime = process.uptime(); const hours = Math.floor(uptime / 3600); const minutes = Math.floor((uptime % 3600) / 60); const seconds = Math.floor(uptime % 60); const totalThreads = global.GoatBot?.allThreadID?.length || 0; const totalUsers = global.GoatBot?.users ? Object.keys(global.GoatBot.users).length : 0; const BOTNAME = global.GoatBot.config.nickNameBot || "KakashiBot"; const BOTPREFIX = global.GoatBot.config.prefix; const GROUPPREFIX = utils.getPrefix(event.threadID); const totalCommands = global.GoatBot.commands.size; // ===== TEXT ===== const ownerText = `╔════════════════════╗ 🌟 B O T S Y S T E M 🌟 ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā• āž¢ Bot Name : ${BOTNAME} āž¢ Prefix : ${BOTPREFIX} āž¢ Group Prefix : ${GROUPPREFIX} āž¢ Total Cmds : ${totalCommands} āž¢ Ping : ${ping} ms ⚔ ╔════════════════════╗ šŸ‘‘ O W N E R I N F O ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā• āž¢ Name : HR ID OY āž¢ Role : Bot Developer āž¢ Facebook : fb.me/dukkhobilash827642 āž¢ Instagram: dukkhobilash____827642 āž¢ WhatsApp :+8801744-****** ╔════════════════════╗ šŸ“Š B O T S T A T S ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā• āž¢ Uptime : ${hours}h ${minutes}m ${seconds}s āž¢ Total Groups : ${totalThreads} āž¢ Total Users : ${totalUsers} ━━━━━━━━━━━━━━━━━━━━━━━ ✨ Powered By HR ID OY ✨ ━━━━━━━━━━━━━━━━━━━━━━━`; // ===== IMAGE FIX (STABLE) ===== const cacheDir = path.join(__dirname, "cache"); if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir, { recursive: true }); const imgPath = path.join(cacheDir, "owner.jpg"); const imgLink = "https://i.imgur.com/3RMAJwi.jpeg"; const downloadImage = () => { return new Promise((resolve, reject) => { request({ url: imgLink, encoding: null }) .pipe(fs.createWriteStream(imgPath)) .on("finish", resolve) .on("error", reject); }); }; try { await downloadImage(); await api.sendMessage( { body: ownerText, attachment: fs.createReadStream(imgPath) }, event.threadID ); fs.unlinkSync(imgPath); } catch (err) { console.error("Owner command error:", err); api.sendMessage(ownerText, event.threadID); } } };