Remove trailing whitespace in command help's usage when the command has no arguments

This commit is contained in:
2025-08-07 22:25:27 -03:00
parent 24d2344f37
commit f123282699
+5 -1
View File
@@ -84,7 +84,11 @@ fn get_command_help_embed(command: &Arc<dyn Command>) -> Embed {
.collect::<Vec<_>>()
.join(" ");
let usage = format!("{name} {arguments}");
let usage = if !arguments.is_empty() {
format!("{name} {arguments}")
} else {
name
};
EmbedBuilder::new()
.author(