diff --git a/commands/base.js b/commands/base.js index 19ecc41..da2d2f4 100644 --- a/commands/base.js +++ b/commands/base.js @@ -25,13 +25,17 @@ module.exports = [ return // Go to next command if this one shouldnt show up } - const arguments = command.arguments && command.arguments.slice() || [] + const arguments = command.arguments && command.arguments.slice() + + if (arguments) { + arguments.forEach((argument, index) => { + if (typeof argument == "object") { + arguments[index] = argument.prototype.name + } + }) + } - arguments.forEach((argument, index) => { - if (typeof argument == "object") { - arguments[index] = argument.prototype.name - } - }) + console.log(arguments) const field = {name: command.name, value: `Description: ${command.description || "None"}\nArguments: ${arguments || "None"}`} embed.addFields(field)