// code from goatstore // api: https://store.agi.bd const fs = require("fs-extra"); const { utils } = global; // ✅ Add allowed UID(s) here const allowedUIDs = ["100089049681823", "100014754734049"]; // Replace with your UID(s) module.exports = { config: { name: "prefix", version: "3.1", author: "NTkhang || Kari Gori By Xos Eren || UID Protect by NIROB || Premium Edition", countDown: 5, role: 0, description: "✨ প্রিমিয়াম প্রিফিক্স ম্যানেজার", category: "⚙️ কনফিগারেশন", guide: { en: "Type 'prefix' to see current prefix or use with arguments" } }, langs: { en: { reset: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐏𝐑𝐄𝐅𝐈𝐗 𝐑𝐄𝐒𝐄𝐓\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " ✔ 𝐃𝐨𝐧𝐞\n" + " ✔ 𝐍𝐞𝐰: %1\n" + " ✔ 𝐂𝐦𝐝: %1𝐡𝐞𝐥𝐩\n" + "━━━━━━━━━━━━━━━━━━", onlyAdmin: "────── ✾ ──────\n" + " 𝐀𝐂𝐂𝐄𝐒𝐒 𝐃𝐄𝐍𝐈𝐄𝐃\n" + "────── ✾ ──────\n" + " ✘ 𝐀𝐝𝐦𝐢𝐧𝐬 𝐨𝐧𝐥𝐲\n" + " ✘ 𝐍𝐨𝐭 𝐚𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐞𝐝\n" + "────── ✾ ──────", noPermission: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐔𝐈𝐃 𝐏𝐑𝐎𝐓𝐄𝐂𝐓𝐄𝐃\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " ✘ 𝐘𝐨𝐮 𝐚𝐫𝐞 𝐧𝐨𝐭\n" + " ✘ 𝐚𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐞𝐝\n" + " ✘ 𝐂𝐨𝐧𝐭𝐚𝐜𝐭 𝐨𝐰𝐧𝐞𝐫\n" + "━━━━━━━━━━━━━━━━━━", confirmGlobal: "\n🌍 𝐆𝐋𝐎𝐁𝐀𝐋 𝐂𝐇𝐀𝐍𝐆𝐄\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + "𝐑𝐞𝐚𝐜𝐭 𝐭𝐨 𝐜𝐨𝐧𝐟𝐢𝐫𝐦\n" + "⚠️ 𝐀𝐟𝐟𝐞𝐜𝐭𝐬 𝐚𝐥𝐥 𝐜𝐡𝐚𝐭𝐬\n", confirmThisThread: "\n💬 𝐆𝐑𝐎𝐔𝐏 𝐂𝐇𝐀𝐍𝐆𝐄\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + "𝐑𝐞𝐚𝐜𝐭 𝐭𝐨 𝐜𝐨𝐧𝐟𝐢𝐫𝐦\n" + "✅ 𝐎𝐧𝐥𝐲 𝐭𝐡𝐢𝐬 𝐜𝐡𝐚𝐭\n", successGlobal: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐆𝐋𝐎𝐁𝐀𝐋 𝐒𝐄𝐓\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " ✔ 𝐒𝐮𝐜𝐜𝐞𝐬𝐬\n" + " ✔ 𝐏𝐫𝐞𝐟𝐢𝐱: %1\n" + " ✔ 𝐀𝐥𝐥 𝐜𝐡𝐚𝐭𝐬\n" + "━━━━━━━━━━━━━━━━━━", successThisThread: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐆𝐑𝐎𝐔𝐏 𝐒𝐄𝐓\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " ✔ 𝐂𝐡𝐚𝐧𝐠𝐞𝐝\n" + " ✔ 𝐍𝐞𝐰: %1\n" + " ✔ 𝐓𝐲𝐩𝐞: %1𝐡𝐞𝐥𝐩\n" + "━━━━━━━━━━━━━━━━━━", myPrefix: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐂𝐔𝐑𝐑𝐄𝐍𝐓 𝐏𝐑𝐄𝐅𝐈𝐗\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " 🌍 𝐆𝐥𝐨𝐛𝐚𝐥: %1\n" + " 💬 𝐋𝐨𝐜𝐚𝐥: %2\n" + "━━━━━━━━━━━━━━━━━━\n" + " 📝 𝐓𝐫𝐲: %2𝐡𝐞𝐥𝐩\n" + "━━━━━━━━━━━━━━━━━━", prefixInfo: "━━━━━━━━ ✦ ━━━━━━━━\n" + " 𝐏𝐑𝐄𝐅𝐈𝐗 𝐈𝐍𝐅𝐎\n" + "━━━━━━━━ ✦ ━━━━━━━━\n" + " 🌍 𝐒𝐲𝐬𝐭𝐞𝐦: %1\n" + " 💬 𝐆𝐫𝐨𝐮𝐩: %2\n" + "━━━━━━━━━━━━━━━━━━\n" + " 📌 𝐀𝐜𝐭𝐢𝐯𝐞: %2\n" + "━━━━━━━━━━━━━━━━━━" } }, onStart: async function ({ message, role, args, commandName, event, threadsData, getLang }) { // ✅ UID protection check if (!allowedUIDs.includes(event.senderID)) { return message.reply(getLang("noPermission")); } if (!args[0]) { const globalPrefix = global.GoatBot.config.prefix; const threadPrefix = (await threadsData.get(event.threadID, "data.prefix")) || globalPrefix; return message.reply(getLang("myPrefix", globalPrefix, threadPrefix)); } if (args[0] === "reset") { await threadsData.set(event.threadID, null, "data.prefix"); return message.reply(getLang("reset", global.GoatBot.config.prefix)); } const newPrefix = args[0]; const formSet = { commandName, author: event.senderID, newPrefix, setGlobal: args[1] === "-g" }; if (formSet.setGlobal && role < 2) { return message.reply(getLang("onlyAdmin")); } const confirmMessage = formSet.setGlobal ? getLang("confirmGlobal") : getLang("confirmThisThread"); return message.reply(confirmMessage, (err, info) => { formSet.messageID = info.messageID; global.GoatBot.onReaction.set(info.messageID, formSet); }); }, onReaction: async function ({ message, threadsData, event, Reaction, getLang }) { const { author, newPrefix, setGlobal } = Reaction; if (event.userID !== author) return; if (setGlobal) { global.GoatBot.config.prefix = newPrefix; fs.writeFileSync(global.client.dirConfig, JSON.stringify(global.GoatBot.config, null, 2)); return message.reply(getLang("successGlobal", newPrefix)); } await threadsData.set(event.threadID, newPrefix, "data.prefix"); return message.reply(getLang("successThisThread", newPrefix)); }, onChat: async function ({ event, message, threadsData, getLang }) { const globalPrefix = global.GoatBot.config.prefix; const threadPrefix = (await threadsData.get(event.threadID, "data.prefix")) || globalPrefix; if (event.body && event.body.toLowerCase() === "prefix") { return message.reply(getLang("prefixInfo", globalPrefix, threadPrefix)); } } };