hide admin commands from suggestions etc.

This commit is contained in:
dusk 2025-10-11 05:17:13 +00:00
parent 7dd2a4e7e1
commit 42c9429953
No known key found for this signature in database
3 changed files with 10 additions and 0 deletions

View file

@ -147,6 +147,9 @@ pub fn parse_command(prefix: String, input: String) -> CommandResult {
pub fn get_related_commands(prefix: String, input: String) -> String {
let mut s = String::new();
for command in command_definitions::all() {
if !command.show_in_suggestions {
continue;
}
if command.tokens.first().map_or(false, |token| {
token
.try_match(Some(&input))