const fs = require("fs-extra"); module.exports = { config: { name: "إعادة_تشغيل", aliases: ["restart"], version: "1.1", author: "NTKhang", countDown: 5, role: 2, description: { vi: "Khởi động lại bot", en: "Restart bot" , ar: "إعادة التشغيل" }, category: "Owner", guide: { vi: " {pn}: Khởi động lại bot", en: " {pn}: Restart bot" , ar: "{pn}" } }, langs: { vi: { restartting: "🔄 | Đang khởi động lại bot..." }, en: { restartting: "🔄 | Restarting bot..." }, tl: { restartting: "🔄 | Nire-restart ang bot..." }, hi: { restartting: "🔄 | Bot restart ho raha hai..." }, ar: { restartting: "🔄 | جارٍ إعادة تشغيل البوت..." }, bn: { restartting: "🔄 | Bot পুনরায় চালু হচ্ছে..." } }, onLoad: function ({ api }) { const pathFile = `${__dirname}/tmp/restart.txt`; if (fs.existsSync(pathFile)) { const [tid, time] = fs.readFileSync(pathFile, "utf-8").split(" "); api.sendMessage(`✅ | Bot restarted\n⏰ | Time: ${(Date.now() - time) / 1000}s`, tid); fs.unlinkSync(pathFile); } }, onStart: async function ({ message, event, getLang }) { const pathFile = `${__dirname}/tmp/restart.txt`; fs.writeFileSync(pathFile, `${event.threadID} ${Date.now()}`); await message.reply(getLang("restartting")); process.exit(2); } };