feat(commands): allow commands to not be suggested

This commit is contained in:
dusk 2025-01-11 23:05:29 +09:00
parent f0d287b873
commit 58f07c3baa
No known key found for this signature in database
3 changed files with 14 additions and 6 deletions

View file

@ -110,6 +110,7 @@ pub fn parse_command(prefix: String, input: String) -> CommandResult {
if !possible_commands.is_empty() {
error.push_str(" Perhaps you meant to use one of the commands below:\n");
for command in possible_commands {
if !command.show_in_suggestions { continue }
writeln!(&mut error, "- **{prefix}{command}** - *{}*", command.help)
.expect("oom");
}