// code from goatstore // api: https://store.agi.bd const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; module.exports = { config: { name: "help", version: "1.18", author: "Mahabul JR", countDown: 5, role: 0, shortDescription: { en: "View command usage" }, longDescription: { en: "View command usage and list all available commands" }, category: "info", guide: { en: "{pn} [empty | | ]" }, priority: 1, }, onStart: async function ({ message, args, event, threadsData, role }) { const { threadID } = event; const prefix = getPrefix(threadID); if (args.length === 0) { const categories = {}; let msg = "╭─ Mαнαвυℓ JR࿐ PROJECT ─\n"; for (const [name, value] of commands) { if (value.config.role > 1 && role < value.config.role) continue; let category = (value.config.category || "Uncategorized").toLowerCase().trim(); if (!categories[category]) categories[category] = []; categories[category].push(name); } const sortedCats = Object.keys(categories).sort(); for (const category of sortedCats) { if (category === "info") continue; msg += `\n✦ ${category.toUpperCase()}\n`; const names = categories[category].sort(); for (let i = 0; i < names.length; i += 3) { msg += `${names.slice(i, i + 3).join(" • ")}\n`; } } msg += `━━━━━━━━━━━━━━\nTotal: ${commands.size} commands\nPrefix: ${prefix}\nType: ${prefix}help \n━━━━━━━━━━━━━━\nADMIN: Mahabul JR 彡η\nBOT: Mαнαвυℓ JR࿐ PROJECT`; return message.reply(msg); } else { const commandName = args[0].toLowerCase(); const command = commands.get(commandName) || commands.get(aliases.get(commandName)); if (!command) return message.reply(`Command "${commandName}" not found.`); const config = command.config; return message.reply(`Name: ${config.name}\nCategory: ${config.category}\nAuthor: ${config.author}\nGuide: ${config.guide.en.replace("{pn}", prefix + config.name)}`); } } };