Fix errors when running with arguments | I don't trust this to not break again, xD
This commit is contained in:
parent
67b126ccff
commit
b7c4cb011e
|
@ -22,6 +22,7 @@ module.exports = {
|
||||||
if (!command) {
|
if (!command) {
|
||||||
return {
|
return {
|
||||||
embeds: [{
|
embeds: [{
|
||||||
|
color: 9442302,
|
||||||
title: `:question: SEYMOUR! THE ${client.user.username} IS ON FIRE!`,
|
title: `:question: SEYMOUR! THE ${client.user.username} IS ON FIRE!`,
|
||||||
description: `Run ${config.prefix}help for more information on each command.`,
|
description: `Run ${config.prefix}help for more information on each command.`,
|
||||||
footer: {
|
footer: {
|
||||||
|
@ -35,12 +36,11 @@ module.exports = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// const cmdName = args[0].toLowerCase();
|
|
||||||
const cmdName = command;
|
const cmdName = command;
|
||||||
const cmd = client.commands.get(cmdName);
|
const cmd = client.commands.get(cmdName);
|
||||||
console.log(cmd.options.map(option => option.required));
|
console.log(cmd.options.map);
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
return client.generateErrorMessage(`${cmdName} is not a valid command! Run ${config.prefix}help for a command list.`);
|
return client.generateErrorMessage(`${cmdName} is not a valid command. Run ${config.prefix}help for a command list!`);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
embeds: [{
|
embeds: [{
|
||||||
|
@ -55,8 +55,8 @@ module.exports = {
|
||||||
{ name: 'Command Name', value: `${cmdName}`, inline: true },
|
{ name: 'Command Name', value: `${cmdName}`, inline: true },
|
||||||
{ name: 'Command Description', value: cmd.description, inline: true },
|
{ name: 'Command Description', value: cmd.description, inline: true },
|
||||||
{ name: 'Command Options', value: cmd.options.map(option => option.name).join('\n') || 'None', inline: true },
|
{ name: 'Command Options', value: cmd.options.map(option => option.name).join('\n') || 'None', inline: true },
|
||||||
{ name: 'Command Option Description', value: cmd.options.map(option => option.description) || 'None', inline: true }
|
{ name: 'Command Option Description', value: cmd.options.map(option => option.description).join('\n') || 'None', inline: true }
|
||||||
// { name: 'Command Option Required?', value: cmd.options.map(option => option.required) ? 'Yes' : 'No' }
|
// { name: 'Command Option Required?', value: cmd.options.map(option => option.required) ? 'Yes' : 'No' }
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue