Remove trailing whitespace in command help's usage when the command has no arguments
This commit is contained in:
@@ -84,7 +84,11 @@ fn get_command_help_embed(command: &Arc<dyn Command>) -> Embed {
|
|||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(" ");
|
.join(" ");
|
||||||
|
|
||||||
let usage = format!("{name} {arguments}");
|
let usage = if !arguments.is_empty() {
|
||||||
|
format!("{name} {arguments}")
|
||||||
|
} else {
|
||||||
|
name
|
||||||
|
};
|
||||||
|
|
||||||
EmbedBuilder::new()
|
EmbedBuilder::new()
|
||||||
.author(
|
.author(
|
||||||
|
|||||||
Reference in New Issue
Block a user