// code from goatstore // api: https://store.agi.bd const { commands } = global.GoatBot; function stylish(text) { const map = { 'A': '๐—”', 'B': '๐—•', 'C': '๐—–', 'D': '๐——', 'E': '๐—˜', 'F': '๐—™', 'G': '๐—š', 'H': '๐—›', 'I': '๐—œ', 'J': '๐—', 'K': '๐—ž', 'L': '๐—Ÿ', 'M': '๐— ', 'N': '๐—ก', 'O': '๐—ข', 'P': '๐—ฃ', 'Q': '๐—ค', 'R': '๐—ฅ', 'S': '๐—ฆ', 'T': '๐—ง', 'U': '๐—จ', 'V': '๐—ฉ', 'W': '๐—ช', 'X': '๐—ซ', 'Y': '๐—ฌ', 'Z': '๐—ญ', 'a': '๐—ฎ', 'b': '๐—ฏ', 'c': '๐—ฐ', 'd': '๐—ฑ', 'e': '๐—ฒ', 'f': '๐—ณ', 'g': '๐—ด', 'h': '๐—ต', 'i': '๐—ถ', 'j': '๐—ท', 'k': '๐—ธ', 'l': '๐—น', 'm': '๐—บ', 'n': '๐—ป', 'o': '๐—ผ', 'p': '๐—ฝ', 'q': '๐—พ', 'r': '๐—ฟ', 's': '๐˜€', 't': '๐˜', 'u': '๐˜‚', 'v': '๐˜ƒ', 'w': '๐˜„', 'x': '๐˜…', 'y': '๐˜†', 'z': '๐˜‡', '0': '๐Ÿฌ', '1': '๐Ÿญ', '2': '๐Ÿฎ', '3': '๐Ÿฏ', '4': '๐Ÿฐ', '5': '๐Ÿฑ', '6': '๐Ÿฒ', '7': '๐Ÿณ', '8': '๐Ÿด', '9': '๐Ÿต' }; return text.split('').map(c => map[c] || c).join(''); } module.exports = { config: { name: "help", version: "4.5", author: "๏ผฎ๐—œ๐—ฅ๐—ข๐—•", role: 0, shortDescription: { en: "Cyber-Tech minimalist help menu" }, longDescription: { en: "Sleek cyber-core help menu with custom fonts, author details, FB link, and functional reaction pagination" }, category: "info", guide: { en: "{pn} [page] or {pn} " }, }, onStart: async function ({ message, args, event, role }) { const threadID = event.threadID; const prefix = (global.utils && typeof global.utils.getPrefix === "function" ? global.utils.getPrefix(threadID) : null) || global.GoatBot.config.prefix || "!"; if (args[0] && isNaN(args[0])) { const q = args[0].toLowerCase().trim(); const cmd = commands.get(q); if (!cmd) return message.reply(stylish(`[!] Command "${q}" not found.`)); const i = cmd.config || {}; return message.reply(stylish( `โŸจยซยซ COMMAND INFO ยปยปโŸฉ\n` + `โŒŠ Name โžญ ${i.name || q} โŒ‹\n\n` + `โŸก Author โžญ ${i.author || "๏ผฎ๐—œ๐—ฅ๐—ข๐—•"}\n` + `โŸก Category โžญ ${i.category || "General"}\n` + `โŸก Desc โžญ ${i.description || "None"}\n\n` + `โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n` + `ยป Usage โžญ ${prefix}${i.usage || i.name || q}` )); } let page = parseInt(args[0]) || 1; if (page < 1 || page > 10) page = 1; const available = []; for (const [name, cmd] of commands) { if (cmd.config.role <= role) available.push(cmd); } const categories = {}; for (const cmd of available) { const cat = cmd.config.category || "Other"; if (!categories[cat]) categories[cat] = []; categories[cat].push(cmd.config.name); } const allCats = Object.keys(categories); const totalPages = 10; const perPage = Math.ceil(allCats.length / totalPages) || 1; async function sendPage(p, oldID = null) { const start = (p - 1) * perPage; const pageCats = allCats.slice(start, start + perPage); let txt = stylish(`โŸจยซยซ KAKASHI โ€ข CORE ยปยปโŸฉ\n`) + stylish(` โŒŠ Page โžญ ${String(p).padStart(2, '0')} / ${String(totalPages).padStart(2, '0')} โŒ‹\n\n`); if (pageCats.length === 0) { txt += stylish(` โŸก No commands available\n\n`); } else { for (const cat of pageCats) { const cName = stylish(cat.toUpperCase()); const list = categories[cat].map(c => stylish(` ยป ${prefix}${c}`)).join('\n'); txt += stylish(`โŸก ${cName}\n`) + list + `\n\n`; } } const next = p >= totalPages ? 1 : p + 1; txt += stylish(`โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n` + `[โ€ข] Dev โžญ ๏ผฎ๐—œ๐—ฅ๐—ข๐—•\n` + `[โ€ข] FB โžญ facebook.com/nahad.nirob007\n` + `[โ€ข] React ๐Ÿ–ค for next page\n` + `[โ€ข] Type: ${prefix}help ${next}`); const sent = await message.reply(txt); if (oldID) { try { await global.GoatBot.api.unsendMessage(oldID); } catch (e) {} } global.GoatBot.onReaction.set(sent.messageID, { messageObj: message, onReact: async (e) => { if (e.reaction !== '๐Ÿ–ค') return; const nextP = p >= totalPages ? 1 : p + 1; await sendPage(nextP, sent.messageID); } }); } await sendPage(page); } };