mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
+6
-1
@@ -74,7 +74,12 @@ module.exports = class CommandClient extends Client {
|
|||||||
const parsed = await this.dispatcher.parseMessage(msg);
|
const parsed = await this.dispatcher.parseMessage(msg);
|
||||||
if (parsed.error) {
|
if (parsed.error) {
|
||||||
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
|
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
|
||||||
await msg.reply(`${parsed.error}\n\nUse ${helpUsage} for more information.`);
|
await msg.reply(stripIndents`
|
||||||
|
${parsed.error}
|
||||||
|
|
||||||
|
Use ${helpUsage} for more information.
|
||||||
|
Example: ${parsed.command.example(msg)}
|
||||||
|
`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { command, args } = parsed;
|
const { command, args } = parsed;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ module.exports = class CommandDispatcher {
|
|||||||
error: stripIndents`
|
error: stripIndents`
|
||||||
The "${arg.label || arg.key}" argument is required.
|
The "${arg.label || arg.key}" argument is required.
|
||||||
${arg.invalidText}
|
${arg.invalidText}
|
||||||
Correct Usage Example: ${command.example(msg)}
|
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -76,7 +75,6 @@ module.exports = class CommandDispatcher {
|
|||||||
error: stripIndents`
|
error: stripIndents`
|
||||||
An invalid value was provided for one of the "${arg.label || arg.key}" arguments.
|
An invalid value was provided for one of the "${arg.label || arg.key}" arguments.
|
||||||
${arg.invalidText}
|
${arg.invalidText}
|
||||||
Correct Usage Example: ${command.example(msg)}
|
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -93,7 +91,6 @@ module.exports = class CommandDispatcher {
|
|||||||
error: stripIndents`
|
error: stripIndents`
|
||||||
The "${arg.label || arg.key}" argument is required.
|
The "${arg.label || arg.key}" argument is required.
|
||||||
${arg.invalidText}
|
${arg.invalidText}
|
||||||
Correct Usage Example: ${command.example(msg)}
|
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@@ -110,7 +107,6 @@ module.exports = class CommandDispatcher {
|
|||||||
error: stripIndents`
|
error: stripIndents`
|
||||||
An invalid value was provided for the "${arg.label || arg.key}" argument.
|
An invalid value was provided for the "${arg.label || arg.key}" argument.
|
||||||
${arg.invalidText}
|
${arg.invalidText}
|
||||||
Correct Usage Example: ${command.example(msg)}
|
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user