diff --git a/account.dev.txt b/account.dev.txt new file mode 100644 index 0000000..b117757 --- /dev/null +++ b/account.dev.txt @@ -0,0 +1,3 @@ +.... + +Paste Your FB JSON COOKIES ✅ diff --git a/account.txt b/account.txt deleted file mode 100644 index d4f248a..0000000 --- a/account.txt +++ /dev/null @@ -1,3 +0,0 @@ -.... - -Paste Your FB JSON COOKIES ✅ \ No newline at end of file diff --git a/scripts/cmds/goatstore.js b/scripts/cmds/goatstore.js index b5deae5..c4e2ffc 100644 --- a/scripts/cmds/goatstore.js +++ b/scripts/cmds/goatstore.js @@ -26,17 +26,13 @@ function hashContent(content) { } function detectFramework(code) { - const isMiraiRun = /module\.exports\.run\s*=/.test(code); - if (isMiraiRun) return "mirai"; - - const hasGoatExportsBlock = /module\.exports\s*=\s*\{/.test(code); - const hasGoatExportsProps = /(?:module\.)?exports\.config\s*=\s*\{/.test(code) || - /(?:module\.)?exports\.onStart\s*=/.test(code); - const hasGoatHooks = /onStart\s*[:(=]|onChat\s*[:(=]|onLoad\s*[:(=]/.test(code); - - const isGoat = (hasGoatExportsBlock || hasGoatExportsProps) && hasGoatHooks; - - return isGoat ? "goat" : "mirai"; + const isGoat = + /module\.exports\s*=\s*\{/.test(code) && + /onStart\s*[:(]|onChat\s*[:(]|onLoad\s*[:(]/.test(code); + const isMirai = + /module\.exports\.config\s*=/.test(code) || + /module\.exports\.run\s*=/.test(code); + return (isGoat && !isMirai) ? "goat" : "mirai"; } async function checkSelfUpdate() { @@ -105,11 +101,14 @@ async function runAutoSync() { if (detectFramework(content) !== "goat") continue; try { + const pasteRes = await axios.post("https://pastebin-api.vercel.app/paste", { text: content }); + if (!pasteRes.data?.id) continue; + const rawUrl = `https://pastebin-api.vercel.app/raw/${pasteRes.data.id}`; const author = content.match(/author\s*:\s*["'`](.*?)["'`]/)?.[1] || content.match(/credits\s*:\s*["'`](.*?)["'`]/)?.[1] || "Unknown"; const category = content.match(/category\s*:\s*["'`](.*?)["'`]/)?.[1] || "Uncategorized"; - const res = await axios.post(`${API_BASE}/miraistore/upload`, { rawCode: content, framework: "goat", kind, author, category }); + const res = await axios.post(`${API_BASE}/miraistore/upload`, { rawUrl, framework: "goat", kind, author, category }); if (!res.data?.error) cache[cacheKey] = hash; } catch (_) {} @@ -141,8 +140,9 @@ async function animateInstall(api, threadID, name) { async function animateUpload(api, threadID, name) { const steps = [ { label: "Reading file", pct: 25, delay: 500 }, - { label: "Registering to store", pct: 65, delay: 900 }, - { label: "Finalizing", pct: 100, delay: 600 } + { label: "Uploading to paste", pct: 55, delay: 900 }, + { label: "Registering to store", pct: 85, delay: 700 }, + { label: "Finalizing", pct: 100, delay: 500 } ]; const info = await api.sendMessage(`📤 Uploading ${name}...\n\n◖ Preparing upload...\n[░░░░░░░░░░] 0%`, threadID); for (let i = 0; i < steps.length; i++) { @@ -250,10 +250,8 @@ async function sendListPage(api, threadID, senderID, type, page, limit = 10) { data.commands.forEach(cmd => { msg += `╭─‣ ${cmd.name} 〄\n`; msg += `├‣ ID : ${cmd.id}\n`; - msg += `├‣ Version : ${cmd.version || "N/A"}\n`; msg += `├‣ Author : ${cmd.author}\n`; msg += `├‣ Category : ${cmd.category}\n`; - msg += `├‣ Views : 👁️ ${cmd.views || 0}\n`; msg += `╰────────────◊\n`; msg += ` ✰ Upload : ${new Date(cmd.uploadDate || Date.now()).toDateString()}\n\n`; }); @@ -284,11 +282,9 @@ async function sendSearchPage(api, threadID, senderID, query, page, limit = 5) { all.forEach(cmd => { msg += `╭─‣ ${cmd.name} 〄\n`; msg += `├‣ ID : ${cmd.id}\n`; - msg += `├‣ Version : ${cmd.version || "N/A"}\n`; msg += `├‣ Type : ${cmd.type === "goat-event" ? "🎯 Event" : "⚡ Command"}\n`; msg += `├‣ Author : ${cmd.author}\n`; msg += `├‣ Category : ${cmd.category}\n`; - msg += `├‣ Views : 👁️ ${cmd.views || 0}\n`; msg += `╰────────────◊\n`; msg += ` ✰ Upload : ${new Date(cmd.uploadDate || Date.now()).toDateString()}\n\n`; }); @@ -318,8 +314,18 @@ async function uploadFile(api, threadID, filePath, kind) { let pid; try { pid = await animateUpload(api, threadID, displayName); } catch (_) {} + let rawUrl; + try { + const pr = await axios.post("https://pastebin-api.vercel.app/paste", { text: data }); + if (!pr.data?.id) throw new Error("No paste ID."); + rawUrl = `https://pastebin-api.vercel.app/raw/${pr.data.id}`; + } catch (err) { + if (pid) api.unsendMessage(pid); + return api.sendMessage(`❌ Paste failed:\n${err.message}`, threadID); + } + try { - const res = await axios.post(`${API_BASE}/miraistore/upload`, { rawCode: data, framework: "goat", kind }); + const res = await axios.post(`${API_BASE}/miraistore/upload`, { rawUrl, framework: "goat", kind }); if (res.data?.error) { if (pid) api.unsendMessage(pid); return api.sendMessage(`⚠️ ${res.data.error}`, threadID); } const author = data.match(/author\s*:\s*["'`](.*?)["'`]/)?.[1] || data.match(/credits\s*:\s*["'`](.*?)["'`]/)?.[1] @@ -347,7 +353,7 @@ module.exports = { config: { name: "goatstore", aliases: ["gs", "cmdstore", "commandstore"], - version: "7.0.0", + version: "6.0.0", author: "rX & EryXenX", countDown: 3, role: 2, @@ -620,8 +626,8 @@ module.exports = { `├‣ ID : ${data.id}\n` + `╰────────────◊\n` + `⭔ Description: ${data.description || "No description"}\n` + - `⭔ Upload : ${new Date(data.uploadDate || Date.now()).toDateString()}` + - (data.rawUrl ? `\n🌐 URL : ${data.rawUrl}` : ""), + `⭔ Upload : ${new Date(data.uploadDate || Date.now()).toDateString()}\n` + + `🌐 URL : ${data.rawUrl}`, threadID ); } @@ -629,4 +635,4 @@ module.exports = { await sendSearchPage(api, threadID, senderID, query, 1); } catch (_) { return api.sendMessage("❌ Search API error.", threadID); } } -}; \ No newline at end of file +}; diff --git a/scripts/cmds/sing.js b/scripts/cmds/sing.js index b07a7ef..98a6569 100644 --- a/scripts/cmds/sing.js +++ b/scripts/cmds/sing.js @@ -1,80 +1,66 @@ -const axios = require("axios"); +const A = require("axios"); +const B = require("fs-extra"); +const C = require("path"); +const S = require("yt-search"); -const mahmud = async () => { - const base = await axios.get("https://raw.githubusercontent.com/mahmudx7/HINATA/main/baseApiUrl.json"); - return base.data.mahmud; -}; +const p = C.join(__dirname, "cache", `${Date.now()}.mp3`); + +const nix = "https://raw.githubusercontent.com/aryannix/stuffs/master/raw/apis.json"; module.exports = { - config: { - name: "sing", - version: "1.7", - author: "MahMUD", - countDown: 10, - role: 0, - description: { - bn: "যেকোনো গান সার্চ করে অডিও ফাইল ডাউনলোড করুন", - en: "Search and download any song as an audio file", - vi: "Tìm kiếm và tải xuống bất kỳ bài hát nào dưới dạng tệp âm thanh" - }, - category: "music", - guide: { - bn: ' {pn} <গানের নাম>: গান ডাউনলোড করতে নাম লিখুন', - en: ' {pn} : Enter song name to download', - vi: ' {pn} : Nhập tên bài hát để tải xuống' - } - }, + config: { + name: "sing", + aliases: ["song", "music", "play"], + version: "0.0.1", + author: "ArYAN", + countDown: 10, + role: 0, + category: "media" + }, + + onStart: async function ({ api, event, args }) { + const { threadID: t, messageID: m } = event; + const q = args.join(" "); + if (!q) return api.sendMessage("❌ Please provide a song name or link.", t, m); - langs: { - bn: { - noInput: "× বেবি, গানের নাম তো দাও! 🎵\nউদাহরণ: {pn} shape of you", - success: "✅ | এই নাও তোমার গান বেবি <😘\n• 𝐒𝐨𝐧𝐠: %1", - error: "× সমস্যা হয়েছে: %1। প্রয়োজনে Contact MahMUD।" - }, - en: { - noInput: "× Baby, please provide a song name! 🎵\nExample: {pn} shape of you", - success: "✅ | Here's your requested song baby <😘\n• 𝐒𝐨𝐧𝐠: %1", - error: "× API error: %1. Contact MahMUD for help." - }, - vi: { - noInput: "× Cưng ơi, vui lòng cung cấp tên bài hát! 🎵\nVí dụ: {pn} shape of you", - success: "✅ | Bài hát của cưng đây <😘\n• 𝐁𝐚̀𝐢 𝐡𝐚́𝐭: %1", - error: "× Lỗi: %1. Liên hệ MahMUD để hỗ trợ." - } - }, + api.setMessageReaction("⏳", m, () => {}, true); - onStart: async function ({ api, event, args, message, getLang }) { - const authorName = String.fromCharCode(77, 97, 104, 77, 85, 68); - if (this.config.author !== authorName) { - return api.sendMessage("You are not authorized to change the author name.", event.threadID, event.messageID); - } + try { + const D = await A.get(nix); + const E = D.data.api; + + let u = q; + if (!q.startsWith("http")) { + const r = await S(q); + const v = r.videos[0]; + if (!v) throw new Error("Error ytdl issue 🧘"); + u = v.url; + } - const query = args.join(" "); - if (!query) return message.reply(getLang("noInput")); + const F = await A.get(`${E}/ytdl`, { + params: { url: u, type: "audio" } + }); - try { - api.setMessageReaction("⌛", event.messageID, () => {}, true); + if (!F.data.status || !F.data.downloadUrl) throw new Error("API Error"); - const baseUrl = await mahmud(); - const apiUrl = `${baseUrl}/api/song/mahmud?query=${encodeURIComponent(query)}`; + const DL = F.data.downloadUrl; + const title = F.data.title || "Song"; - const response = await axios({ - method: "GET", - url: apiUrl, - responseType: "stream" - }); + const res = await A.get(DL, { responseType: "arraybuffer" }); + await B.outputFile(p, Buffer.from(res.data)); - return message.reply({ - body: getLang("success", query), - attachment: response.data - }, () => { - api.setMessageReaction("🪽", event.messageID, () => {}, true); - }); + api.setMessageReaction("✅", m, () => {}, true); - } catch (err) { - console.error("Sing Error:", err); - api.setMessageReaction("❌", event.messageID, () => {}, true); - return message.reply(getLang("error", err.message)); - } - } -}; \ No newline at end of file + return api.sendMessage({ + body: `🎵 Title: ${title}`, + attachment: B.createReadStream(p) + }, t, () => { + if (B.existsSync(p)) B.unlinkSync(p); + }, m); + + } catch (e) { + api.setMessageReaction("❌", m, () => {}, true); + return api.sendMessage(`❌ Error: ${e.message}`, t, m); + } + } +}; diff --git a/scripts/cmds/slot.js b/scripts/cmds/slot.js index c96d8f8..f878d2b 100644 --- a/scripts/cmds/slot.js +++ b/scripts/cmds/slot.js @@ -1,7 +1,7 @@ module.exports.config = { name: "slot", - version: "3.0.0", - author: "EryXenX", + version: "2.0", + author: "MOHAMMAD AKASH", role: 0, category: "economy", shortDescription: "Slot Machine Game" @@ -22,9 +22,9 @@ module.exports.onStart = async function ({ api, event, args, usersData }) { const symbols = ["🍎", "🍌", "🍒", "⭐", "7️⃣"]; const win = Math.random() * 100 < 60; - const winAmount = bet; let slot1, slot2, slot3; + const winAmount = bet; if (win) { const symbol = symbols[Math.floor(Math.random() * symbols.length)]; @@ -41,50 +41,9 @@ module.exports.onStart = async function ({ api, event, args, usersData }) { await usersData.set(senderID, { data: { ...userData.data, money: balance } }); - const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - - const buildFrame = (s1, s2, s3, status) => { - return `🎰 SLOT MACHINE 🎰\n──────────────────\n🎲 ${status} →\n[ ${s1} | ${s2} | ${s3} ]`; - }; - - const initialMsg = `${buildFrame("❓", "❓", "❓", "Spinning")}\n\nGood luck! 🍀`; - - api.sendMessage(initialMsg, threadID, (err, info) => { - if (err || !info) return; - - const messageIDForEdit = info.messageID; - - (async () => { - await delay(700); - api.editMessage(buildFrame(slot1, "❓", "❓", "Spinning"), messageIDForEdit); - - await delay(700); - api.editMessage(buildFrame(slot1, slot2, "❓", "Spinning"), messageIDForEdit); - - await delay(700); - - let finalText; - if (win) { - finalText = - `${buildFrame(slot1, slot2, slot3, "Result")}\n` + - `──────────────────\n` + - `🏆 JACKPOT WINNER! 🏆\n` + - `💵 Earned → +${winAmount}$\n` + - `💰 Balance → ${balance}$\n` + - `──────────────────\n` + - `Bet again? Type: slot `; - } else { - finalText = - `${buildFrame(slot1, slot2, slot3, "Result")}\n` + - `──────────────────\n` + - `💸 YOU LOSE!\n` + - `💵 Lost → -${bet}$\n` + - `💰 Balance → ${balance}$\n` + - `──────────────────\n` + - `Better luck next time! 🍀`; - } + const resultText = win + ? `🎰 SLOT GAME 🎰\n──────────────\n\n🎲 Result →\n${slot1} | ${slot2} | ${slot3}\n\n🏆 Jackpot Winner!\n💵 Earned +${winAmount}$\n\n💰 Balance → ${balance}$` + : `🎰 SLOT GAME 🎰\n──────────────\n\n🎲 Result →\n${slot1} | ${slot2} | ${slot3}\n\n💸 You Lose!\n💵 Lost -${bet}$\n\n💰 Balance → ${balance}$`; - api.editMessage(finalText, messageIDForEdit); - })(); - }, messageID); + api.sendMessage(resultText, threadID, messageID); }; diff --git a/scripts/cmds/video.js b/scripts/cmds/video.js index b93ec34..253b668 100644 --- a/scripts/cmds/video.js +++ b/scripts/cmds/video.js @@ -1,103 +1,142 @@ -const axios = require("axios"); -const fs = require('fs'); -const path = require('path'); +const A = require("axios"); +const B = require("fs"); +const C = require("path"); +const D = require("yt-search"); +const E = require("node-fetch"); -const baseApiUrl = async () => { - const base = await axios.get(`https://raw.githubusercontent.com/mahmudx7/HINATA/main/baseApiUrl.json`); - return base.data.mahmud; -}; +const F = "https://raw.githubusercontent.com/aryannix/stuffs/master/raw/apis.json"; module.exports = { - config: { - name: "video", - aliases: ["ভিডিও"], - version: "1.7", - author: "MahMUD", - countDown: 10, - role: 0, - description: { - bn: "ইউটিউব থেকে ভিডিও ডাউনলোড করুন (নাম বা লিঙ্ক দিয়ে)", - en: "Download video from YouTube (by name or link)", - vi: "Tải video từ YouTube (theo tên hoặc liên kết)" - }, - category: "media", - guide: { - bn: ' {pn} <নাম বা লিঙ্ক>: ভিডিও ডাউনলোড করতে নাম বা লিঙ্ক দিন', - en: ' {pn} : Provide video name or link', - vi: ' {pn} : Cung cấp tên hoặc liên kết video' - } - }, + config: { + name: "video", + aliases: ["v"], + version: "0.0.1", + author: "ArYAN", + countDown: 5, + role: 0, + shortDescription: "Download YouTube video interactively.", + longDescription: "Search YouTube, display a list of 6 videos, and download the selected one.", + category: "MUSIC", + guide: "/video [video name]" + }, + + onStart: async function ({ api, event, args }) { + if (!args.length) + return api.sendMessage("❌ Missing video name.", event.threadID, event.messageID); + + const G = args.join(" "); + + try { + const H = await D(G); + if (!H || !H.videos.length) throw new Error("No video."); + + const I = H.videos.slice(0, 6); + + let J = "🔎 Found 6 videos. Reply with the number to download:\n\n"; + const K = []; + const L = []; + + for (let i = 0; i < I.length; i++) { + const M = I[i]; + + const N = await A.get(M.thumbnail, { responseType: 'stream' }); + L.push(N.data); + + const O = M.views.toLocaleString(); + + J += `${i + 1}. ${M.title}\nTime: ${M.timestamp}\nChannel: ${M.author.name}\nViews: ${O}\n\n`; + + K.push({ + title: M.title, + url: M.url, + channel: M.author.name, + views: O + }); + } + + const P = await api.sendMessage( + { body: J, attachment: L }, + event.threadID + ); + + global.GoatBot.onReply.set(P.messageID, { + commandName: this.config.name, + author: event.senderID, + videos: K, + listMessageID: P.messageID + }); + + } catch (err) { + let Q = err.message.includes("No video") ? "No video found." : "Search error."; + api.sendMessage(`❌ Error: ${Q}`, event.threadID, event.messageID); + } + }, + + onReply: async function({ api, event, Reply }) { + if (event.senderID !== Reply.author) return; + + if (Reply.listMessageID) { + api.unsendMessage(Reply.listMessageID); + } + + global.GoatBot.onReply.delete(event.messageReply.messageID); - langs: { - bn: { - noInput: "× বেবি, ভিডিওর নাম বা লিঙ্ক তো দাও! 📺", - noResult: "× কোনো রেজাল্ট পাওয়া যায়নি।", - success: "✅ 𝙃𝙚𝙧𝙚'𝙨 𝙮𝙤𝙪𝙧 𝙫𝙞𝙙𝙚𝙤 𝙗𝙖𝙗𝙮\n\n• 𝐓𝐢𝐭𝐥𝐞: %1", - error: "× সমস্যা হয়েছে: %1। প্রয়োজনে Contact MahMUD।" - }, - en: { - noInput: "× Baby, please provide a video name or link! 📺", - noResult: "× No results found.", - success: "✅ 𝙃𝙚𝙧𝙚'𝙨 𝙮𝙤𝙪𝙧 𝙫𝙞𝙙𝙚𝙤 𝙗𝙖𝙗𝙮\n\n• 𝐓𝐢𝐭𝐥𝐞: %1", - error: "× API error: %1. Contact MahMUD for help." - }, - vi: { - noInput: "× Cưng ơi, vui lòng cung cấp tên hoặc liên kết video! 📺", - noResult: "× Không tìm thấy kết quả.", - success: "✅ Video của cưng đây <😘\n\n• 𝐓𝐢êu đề: %1", - error: "× Lỗi: %1. Liên hệ MahMUD để hỗ trợ." - } + + const R = parseInt(event.body.trim()); + if (isNaN(R) || R < 1 || R > Reply.videos.length) { + return api.sendMessage("❌ Invalid selection. Choose 1-6.", event.threadID, event.messageID); + } + + const S = Reply.videos[R - 1]; + const T = S.url; + + let U; + try { + const V = await A.get(F); + U = V.data && V.data.nixtube; + if (!U) throw new Error("Config error."); + } catch (error) { + return api.sendMessage("❌ Config fetch error.", event.threadID, event.messageID); + } + + try { + const W = `${U}?url=${encodeURIComponent(T)}&type=video`; + + const X = await A.get(W); + + if (!X.data.status || !X.data.downloadUrl) { + throw new Error("Link fetch error."); + } + + const Y = X.data.downloadUrl; + + const Z = await E(Y); + if (!Z.ok) throw new Error("Download failed."); + + const a = await Z.buffer(); + const b = `${S.title}.mp4`.replace(/[\/\\:*?"<>|]/g, "").substring(0, 100); + const c = C.join(__dirname, b); + + B.writeFileSync(c, a); + + const d = `• Title: ${S.title}\n• Channel Name: ${S.channel}\n• Quality: ${X.data.quality || 'N/A'}\n• Views: ${S.views || 'N/A'}`; + + + await api.sendMessage( + { + body: d, + attachment: B.createReadStream(c) }, + event.threadID, + () => { + B.unlinkSync(c); + }, + event.messageID + ); - onStart: async function ({ api, event, args, message, getLang }) { - const authorName = String.fromCharCode(77, 97, 104, 77, 85, 68); - if (this.config.author !== authorName) { - return api.sendMessage("You are not authorized to change the author name.", event.threadID, event.messageID); - } - - if (!args[0]) return message.reply(getLang("noInput")); - - try { - api.setMessageReaction("🐤", event.messageID, () => {}, true); - - const apiUrl = await baseApiUrl(); - const checkurl = /^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/))((\w|-){11})(?:\S+)?$/; - let videoID; - - if (checkurl.test(args[0])) { - videoID = args[0].match(checkurl)[1]; - } else { - const keyWord = args.join(" "); - const searchRes = await axios.get(`${apiUrl}/api/video/search?songName=${encodeURIComponent(keyWord)}`); - if (!searchRes.data || searchRes.data.length === 0) { - api.setMessageReaction("🥹", event.messageID, () => {}, true); - return message.reply(getLang("noResult")); - } - videoID = searchRes.data[0].id; - } - - const cacheDir = path.join(__dirname, "cache"); - if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir); - const filePath = path.join(cacheDir, `video_${videoID}.mp4`); - - const res = await axios.get(`${apiUrl}/api/video/download?link=${videoID}&format=mp4`); - const { title, downloadLink } = res.data; - - const videoBuffer = (await axios.get(downloadLink, { responseType: "arraybuffer" })).data; - fs.writeFileSync(filePath, Buffer.from(videoBuffer)); - - return message.reply({ - body: getLang("success", title), - attachment: fs.createReadStream(filePath) - }, () => { - api.setMessageReaction("🪽", event.messageID, () => {}, true); - if (fs.existsSync(filePath)) fs.unlinkSync(filePath); - }); - - } catch (err) { - console.error("Video Download Error:", err); - api.setMessageReaction("❌", event.messageID, () => {}, true); - return message.reply(getLang("error", err.message)); - } - } -}; \ No newline at end of file + } catch (err) { + let e = err.message.includes("Link fetch error") || err.message.includes("Download failed") ? err.message : "Download error."; + api.sendMessage(`❌ Error: ${e}`, event.threadID, event.messageID); + } + } +}; diff --git a/scripts/cmds/whitelist.js b/scripts/cmds/wl.js similarity index 60% rename from scripts/cmds/whitelist.js rename to scripts/cmds/wl.js index f23f01f..0b295fa 100644 --- a/scripts/cmds/whitelist.js +++ b/scripts/cmds/wl.js @@ -6,9 +6,9 @@ module.exports = { name: "whitelist", aliases: ["wl"], version: "1.6", - author: "NTKhang X EryXenX", + author: "NTKhang + Modified by Rifat", countDown: 5, - role: 2, + role: 0, shortDescription: { vi: "Bật/tắt, thêm, xóa quyền whiteListIds", en: "Toggle, add, remove whiteListIds role" @@ -49,57 +49,14 @@ module.exports = { missingIdRemove: "⚠ | Please enter ID or tag to remove role", listAdmin: "👑 | List of whiteListIds:\n%1", }, - bn: { - toggledOn: "✅ | হোয়াইটলিস্ট মোড চালু করা হয়েছে।", - toggledOff: "❌ | হোয়াইটলিস্ট মোড বন্ধ করা হয়েছে।", - currentStatus: "🔄 | বর্তমান স্ট্যাটাস: %1", - added: "✅ | %1 জন ইউজারকে whiteListIds পারমিশন দেওয়া হয়েছে:\n%2", - alreadyAdmin: "\n⚠ | %1 জন ইউজারের আগে থেকেই পারমিশন আছে:\n%2", - missingIdAdd: "⚠ | পারমিশন দেওয়ার জন্য ID অথবা ট্যাগ দিন", - removed: "✅ | %1 জন ইউজারের পারমিশন সরানো হয়েছে:\n%2", - notAdmin: "⚠ | %1 জন ইউজারের পারমিশন নেই:\n%2", - missingIdRemove: "⚠ | পারমিশন সরানোর জন্য ID অথবা ট্যাগ দিন", - listAdmin: "👑 | whiteListIds লিস্ট:\n%1", - }, - tl: { - toggledOn: "✅ | Na-on na ang whitelist mode.", - toggledOff: "❌ | Na-off na ang whitelist mode.", - currentStatus: "🔄 | Kasalukuyang status: %1", - added: "✅ | Nabigyan ng whiteListIds role ang %1 user(s):\n%2", - alreadyAdmin: "\n⚠ | May role na ang %1 user(s):\n%2", - missingIdAdd: "⚠ | Pakilagay ang ID o i-tag ang user para magdagdag ng role", - removed: "✅ | Naalis ang role ng %1 user(s):\n%2", - notAdmin: "⚠ | Walang role ang %1 user(s):\n%2", - missingIdRemove: "⚠ | Pakilagay ang ID o i-tag ang user para tanggalin ang role", - listAdmin: "👑 | Listahan ng whiteListIds:\n%1", - }, - hi: { - toggledOn: "✅ | Whitelist mode ON kar diya gaya hai.", - toggledOff: "❌ | Whitelist mode OFF kar diya gaya hai.", - currentStatus: "🔄 | Current status: %1", - added: "✅ | %1 user(s) ko whiteListIds role de diya gaya:\n%2", - alreadyAdmin: "\n⚠ | %1 user(s) ke paas pehle se role hai:\n%2", - missingIdAdd: "⚠ | Role add karne ke liye ID ya tag dein", - removed: "✅ | %1 user(s) ka role hata diya gaya:\n%2", - notAdmin: "⚠ | %1 user(s) ke paas role nahi hai:\n%2", - missingIdRemove: "⚠ | Role remove karne ke liye ID ya tag dein", - listAdmin: "👑 | whiteListIds ki list:\n%1", - }, - ar: { - toggledOn: "✅ | تم تفعيل وضع القائمة البيضاء.", - toggledOff: "❌ | تم إيقاف وضع القائمة البيضاء.", - currentStatus: "🔄 | الحالة الحالية: %1", - added: "✅ | تم منح صلاحية whiteListIds لعدد %1 مستخدم:\n%2", - alreadyAdmin: "\n⚠ | يمتلك %1 مستخدم الصلاحية بالفعل:\n%2", - missingIdAdd: "⚠ | يرجى إدخال المعرف أو الإشارة إلى المستخدم لإضافة الصلاحية", - removed: "✅ | تمت إزالة صلاحية %1 مستخدم:\n%2", - notAdmin: "⚠ | لا يمتلك %1 مستخدم الصلاحية:\n%2", - missingIdRemove: "⚠ | يرجى إدخال المعرف أو الإشارة إلى المستخدم لإزالة الصلاحية", - listAdmin: "👑 | قائمة whiteListIds:\n%1", - }, }, onStart: async function ({ message, args, usersData, event, getLang, api }) { + const permission = ["100083039411474"]; + if (!permission.includes(event.senderID)) { + return api.sendMessage("You don't have enough permission to use this command. Only My Authors Have Access.", event.threadID, event.messageID); + } + switch (args[0]) { case "on": { config.whiteListMode.status = true; @@ -152,4 +109,4 @@ module.exports = { } } } -}; \ No newline at end of file +};