const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; function fancyText(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': '๐–น' }; return text.split("").map(c => map[c] || c).join(""); } const categoryEmoji = (category) => { const emojiMap = { 'info': '๐Ÿ“š', 'information': 'โ„น๏ธ', 'system': 'โš™๏ธ', 'bot': '๐Ÿค–', 'admin': '๐Ÿ‘‘', 'administration': '๐Ÿ‘‘', 'owner': '๐Ÿ‘๏ธ', 'group': '๐Ÿ‘ฅ', 'groups': '๐Ÿ‘ฅ', 'fun': '๐ŸŽฎ', 'entertainment': '๐ŸŽญ', 'game': '๐ŸŽฒ', 'games': '๐ŸŽฎ', 'media': '๐ŸŽต', 'music': '๐ŸŽถ', 'audio': '๐ŸŽต', 'video': '๐ŸŽฌ', 'utility': '๐Ÿ”ง', 'tools': '๐Ÿ› ๏ธ', 'economy': '๐Ÿ’ฐ', 'money': '๐Ÿ’ธ', 'banking': '๐Ÿฆ', 'image': '๐Ÿ–ผ๏ธ', 'photo': '๐Ÿ“ธ', 'picture': '๐Ÿ–ผ๏ธ', 'education': '๐ŸŽ“', 'learning': '๐Ÿ“š', 'nsfw': '๐Ÿ”ž', 'adult': '๐Ÿ”ž', 'chat': '๐Ÿ’ฌ', 'communication': '๐Ÿ’ฌ', 'ai': '๐Ÿค–', 'artificial intelligence': '๐Ÿง ', 'search': '๐Ÿ”', 'productivity': '๐Ÿ“ˆ', 'security': '๐Ÿ›ก๏ธ', 'privacy': '๐Ÿ”’', 'misc': '๐Ÿ“ฆ', 'miscellaneous': '๐Ÿ“ฆ', 'other': '๐ŸŽญ', 'action': '๐ŸŽฏ', 'interaction': '๐Ÿค', 'creative': '๐ŸŽจ', 'design': 'โœ๏ธ', 'data': '๐Ÿ“Š', 'analytics': '๐Ÿ“ˆ', 'gaming': '๐ŸŽฎ', 'world': '๐ŸŒ', 'geography': '๐Ÿ—บ๏ธ', 'social': '๐Ÿ“ฑ', 'social media': '๐Ÿ“ฑ', 'food': '๐Ÿ•', 'drink': '๐Ÿน', 'love': '๐Ÿ’–', 'romance': '๐Ÿ’˜', 'friendship': '๐Ÿค', 'family': '๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ', 'health': '๐Ÿฅ', 'fitness': '๐Ÿ’ช', 'sports': 'โšฝ', 'travel': 'โœˆ๏ธ', 'shopping': '๐Ÿ›๏ธ', 'business': '๐Ÿ’ผ', 'work': '๐Ÿ’ผ', 'study': '๐Ÿ“–', 'book': '๐Ÿ“š', 'movie': '๐ŸŽฌ', 'tv': '๐Ÿ“บ', 'anime': '๐Ÿ‡ฏ๐Ÿ‡ต', 'manga': '๐Ÿ“–', 'comic': '๐Ÿ“š', 'cartoon': '๐Ÿ–ผ๏ธ', 'art': '๐ŸŽจ', 'drawing': 'โœ๏ธ', 'painting': '๐ŸŽจ', 'photography': '๐Ÿ“ท', 'nature': '๐ŸŒฟ', 'animal': '๐Ÿถ', 'pet': '๐Ÿพ', 'car': '๐Ÿš—', 'vehicle': '๐Ÿš—', 'technology': '๐Ÿ’ป', 'computer': '๐Ÿ’ป', 'phone': '๐Ÿ“ฑ', 'internet': '๐ŸŒ', 'web': '๐ŸŒ', 'network': '๐Ÿ”—', 'science': '๐Ÿ”ฌ', 'math': '๐Ÿงฎ', 'physics': 'โš›๏ธ', 'chemistry': '๐Ÿงช', 'biology': '๐Ÿงฌ', 'history': '๐Ÿ“œ', 'culture': '๐ŸŽŽ', 'religion': '๐Ÿ•Œ', 'spiritual': '๐Ÿ™', 'weather': '๐ŸŒค๏ธ', 'time': '๐Ÿ•’', 'date': '๐Ÿ“…', 'calendar': '๐Ÿ“…', 'reminder': 'โฐ', 'alarm': 'โฐ', 'timer': 'โฑ๏ธ', 'stopwatch': 'โฑ๏ธ', 'counter': '๐Ÿ”ข', 'default': '๐Ÿ“' }; const cat = category.toLowerCase(); if (emojiMap[cat]) { return emojiMap[cat]; } for (const [key, emoji] of Object.entries(emojiMap)) { if (cat.includes(key) || key.includes(cat)) { return emoji; } } return emojiMap.default; }; module.exports = { config: { name: "help", version: "2.4", author: "Azadx69x", role: 0, countDown: 5, description: { en: "๐Ÿ“š Show command list or command details" }, category: "Info", guide: { en: "{pn} [command_name]" } }, onStart: async function ({ message, args, event, role }) { const prefix = getPrefix(event.threadID); const input = args[0]?.toLowerCase(); let cmd = null; if (input) { if (commands.has(input)) { cmd = commands.get(input); } else if (aliases.has(input)) { cmd = commands.get(aliases.get(input)); } else { return message.reply( `โ”โ”โ”โ”[ โŒ ๐—ก๐—ข๐—ง ๐—™๐—ข๐—จ๐—ก๐—— ]โ”โ”โ”โ—Š โ”‹โžฅ ๐Ÿ” ๐—–๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ: "${input}" โ”‹โžฅ ๐Ÿ“Œ ๐—จ๐˜€๐—ฒ: ${prefix}๐—ต๐—ฒ๐—น๐—ฝ โ”‹โžฅ ๐—ณ๐—ผ๐—ฟ ๐—ฎ๐—น๐—น ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ โ”•โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—Š` ); } } if (cmd) { const cfg = cmd.config; const desc = typeof cfg.description === "string" ? cfg.description : cfg.description?.en || "โŒ ๐—ก๐—ผ ๐—ฑ๐—ฒ๐˜€๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜๐—ถ๐—ผ๐—ป"; const usage = typeof cfg.guide?.en === "string" ? cfg.guide.en.replace(/\{pn\}/g, prefix + cfg.name) : `${prefix}${cfg.name}`; const aliasesList = cfg.aliases ? cfg.aliases.map(a => `${prefix}${a}`).join(", ") : "โŒ ๐—ก๐—ผ๐—ป๐—ฒ"; const helpMessage = `โ”โ”โ”โ”[ ๐Ÿ“š RS. ๐—•๐—ข๐—ง ๐—›๐—˜๐—Ÿ๐—ฃ ]โ”โ”โ”โ—Š โ”‹โžฅ ๐Ÿ“› ๐—ก๐—ฎ๐—บ๐—ฒ: ${prefix}${cfg.name} โ”‹โžฅ ๐Ÿ—‚๏ธ ๐—–๐—ฎ๐˜๐—ฒ๐—ด๐—ผ๐—ฟ๐˜†: ${categoryEmoji(cfg.category || "other")} ${cfg.category || "โŒ ๐—จ๐—ป๐—ฐ๐—ฎ๐˜๐—ฒ๐—ด๐—ผ๐—ฟ๐—ถ๐˜‡๐—ฒ๐—ฑ"} โ”‹โžฅ ๐Ÿ“„ ๐——๐—ฒ๐˜€๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜๐—ถ๐—ผ๐—ป: ${desc} โ”‹โžฅ โš™๏ธ ๐—ฉ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป: ${cfg.version || "1.0"} โ”‹โžฅ โณ ๐—–๐—ผ๐—ผ๐—น๐—ฑ๐—ผ๐˜„๐—ป: ${cfg.countDown || 1}s โ”‹โžฅ ๐Ÿ”’ ๐—ฅ๐—ผ๐—น๐—ฒ: ${cfg.role === 0 ? "๐Ÿ‘ค ๐—”๐—น๐—น" : cfg.role === 1 ? "๐Ÿ‘‘ ๐—”๐—ฑ๐—บ๐—ถ๐—ป" : "โšก ๐—ข๐˜„๐—ป๐—ฒ๐—ฟ"} โ”‹โžฅ ๐Ÿ‘‘ ๐—”๐˜‚๐˜๐—ต๐—ผ๐—ฟ: ${cfg.author || "โŒ ๐—จ๐—ป๐—ธ๐—ป๐—ผ๐˜„๐—ป"} โ”‹โžฅ ๐Ÿ”ค ๐—”๐—น๐—ถ๐—ฎ๐˜€๐—ฒ๐˜€: ${aliasesList} โ”โ”โ”โ”[ ๐Ÿ“˜ ๐—จ๐—ฆ๐—”๐—š๐—˜ ]โ”โ”โ”โ—Š ${usage.split('\n').map(line => `โ”‹โžฅ ${line}`).join('\n')} โ”โ”โ”โ”[ ๐Ÿ’ก ๐—ก๐—ข๐—ง๐—˜๐—ฆ ]โ”โ”โ”โ—Š โ”‹โžฅ = Replaceable content โ”‹โžฅ [a|b] = Choose option a or b โ”‹โžฅ ( ) = Optional parameter โ”‹โžฅ {pn} = Bot prefix โ”•โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—Š`; try { await message.reply({ body: helpMessage, attachment: await global.utils.getStreamFromURL("https://files.catbox.moe/9ti44b.mp4") }); } catch (error) { console.log("GIF attachment failed, sending text only:", error); await message.reply(helpMessage); } return; } const categories = {}; for (const [, c] of commands) { if (c.config.role > role) continue; const cat = c.config.category || "Uncategorized"; if (!categories[cat]) categories[cat] = []; categories[cat].push(c.config.name); } let msg = `โ”โ”โ”โ”[ ๐Ÿ“š RSโ€ข ๐—•๐—ข๐—ง ๐— ๐—˜๐—ก๐—จ ]โ”โ”โ”โ—Š\n`; const sortedCategories = Object.keys(categories).sort(); for (const cat of sortedCategories) { const categoryName = fancyText(cat.toUpperCase()); const commandsList = categories[cat].sort(); msg += `โ”โ”โ”โ”[ ${categoryEmoji(cat)} ${categoryName} ]โ”โ”โ”โ—Š\n`; for (let i = 0; i < commandsList.length; i += 2) { const cmd1 = commandsList[i]; const cmd2 = commandsList[i + 1]; const line = cmd2 ? `โ”‹โžฅ ${cmd1.padEnd(15)} ${cmd2}` : `โ”‹โžฅ ${cmd1}`; msg += line + "\n"; } msg += "โ”•โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—Š\n"; } const totalCommands = Object.values(categories).flat().length; msg += `โ”โ”โ”โ”[ ๐Ÿ“Š ๐—ฆ๐—ง๐—”๐—ง๐—ฆ ]โ”โ”โ”โ—Š โ”‹โžฅ ๐—ง๐—ผ๐˜๐—ฎ๐—น ๐—–๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€: ${totalCommands} โ”‹โžฅ ๐—ง๐—ผ๐˜๐—ฎ๐—น ๐—–๐—ฎ๐˜๐—ฒ๐—ด๐—ผ๐—ฟ๐—ถ๐—ฒ๐˜€: ${sortedCategories.length} โ”‹โžฅ ๐—”๐—น๐—น ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ ๐—ถ๐—ป ๐—ผ๐—ป๐—ฒ ๐—ฝ๐—ฎ๐—ด๐—ฒ โ”โ”โ”โ”[ ๐Ÿš€ ๐—œ๐—ก๐—™๐—ข ]โ”โ”โ”โ—Š โ”‹โžฅ ๐—ช๐—ฒ๐—น๐—ฐ๐—ผ๐—บ๐—ฒ ๐˜๐—ผ RSโ€ข ๐—•๐—ผ๐˜! โ”‹โžฅ ๐—ฃ๐—ฟ๐—ฒ๐—ณ๐—ถ๐˜…: [ ${prefix} ] โ”‹โžฅ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ: RSโ€ขRIFAT โ”‹โžฅ ๐—จ๐˜€๐—ฒ: ${prefix}๐—ต๐—ฒ๐—น๐—ฝ <๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ> โ”•โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—Š`; try { await message.reply({ body: msg, attachment: await global.utils.getStreamFromURL("https://files.catbox.moe/9ti44b.mp4") }); } catch (error) { console.log("GIF attachment failed, sending text only:", error); await message.reply(msg); } } };