Add support for white spaces between command prefix and name

This commit is contained in:
2025-08-14 17:26:23 -03:00
parent f4a282447a
commit faf9d9d580
+1 -1
View File
@@ -66,7 +66,7 @@ pub fn get_command_parts<'a>(prefix: &str, message: &'a str) -> Option<CommandPa
.to_ascii_lowercase()
.starts_with(&prefix.to_ascii_lowercase())
{
let message = message_trimmed_start.split_at(prefix.len()).1;
let message = message_trimmed_start.split_at(prefix.len()).1.trim_ascii_start();
match message.split_once(" ") {
Some((name, args)) => Some(CommandParts::new(name, args)),