This commit is contained in:
Dragon Fire
2024-04-19 17:52:13 -04:00
parent 0a376584ef
commit 8dbf162dea
+3 -2
View File
@@ -40,12 +40,13 @@ module.exports = class Command {
} }
usage(forcedArgs) { usage(forcedArgs) {
const args = typeof forcedArgs === 'undefined' ? this.args let args = typeof forcedArgs === 'undefined' ? this.args
.map(arg => { .map(arg => {
const hasDefault = arg.default !== null; const hasDefault = arg.default !== null;
return `${hasDefault ? '[' : '<'}${arg.label || arg.key}${hasDefault ? ']' : '>'}`; return `${hasDefault ? '[' : '<'}${arg.label || arg.key}${hasDefault ? ']' : '>'}`;
}).join(' ') : forcedArgs; }).join(' ') : forcedArgs;
return `\`${this.client.commandPrefix}${this.name} ${args}\` or \`@${this.client.user.tag} ${this.name} ${args}\``; args = args ? ` ${args}` : '';
return `\`${this.client.commandPrefix}${this.name}${args}\` or \`@${this.client.user.tag} ${this.name}${args}\``;
} }
disable() { disable() {