const {client, commands} = require("../index") const { EmbedBuilder, Message, Colors } = require("discord.js") module.exports = [ { name: "ping", run: (ctx, args) => { ctx.reply(`Pong! ${args}`) }, hide: false, arguments: ["any"], description: "Check how fast bot will reply!" }, { name: "help", run: (ctx, args) => { const embed = new EmbedBuilder() .setAuthor({name: ctx.author.username, iconURL: ctx.author.avatarURL(), url: "https://git.squog.ru/entar/SquogAdmin"}) .setColor(Colors.White) commands.forEach(commandList => { commandList.forEach(command => { if (command.hide) { return // Go to next command if this one shouldnt show up } const arguments = command.arguments && command.arguments.slice() if (arguments) { arguments.forEach((argument, index) => { console.log(typeof argument) if (typeof argument == "object" || typeof argument == "function") { arguments[index] = argument.prototype.name } }) } console.log(arguments) const field = {name: command.name, value: `Description: ${command.description || "None"}\nArguments: ${arguments || "None"}`} embed.addFields(field) }) }) ctx.reply({embeds: [embed]}) }, hide: true, } ]