Add command aliases

This commit is contained in:
ErrorNoInternet 2023-01-30 14:51:21 +08:00
parent 22d2376879
commit 5627da377f
Signed by untrusted user who does not match committer: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -72,9 +72,9 @@ pub async fn process_command(
let mut command = Command::Unknown;
match segments[0].to_lowercase().as_str() {
"help" => command = Command::Help,
"wait" => command = Command::Wait,
"online" => command = Command::Online,
"location" => command = Command::Location,
"wait" | "sleep" | "pause" => command = Command::Wait,
"online" | "players" => command = Command::Online,
"location" | "position" | "coordinates" => command = Command::Location,
"bot_status" => command = Command::BotStatus,
"whitelist" => command = Command::Whitelist,
"whitelist_add" => command = Command::WhitelistAdd,
@ -91,19 +91,19 @@ pub async fn process_command(
"slot" => command = Command::Slot,
"use_item" => command = Command::UseItem,
"look" => command = Command::Look,
"sneak" => command = Command::Sneak,
"unsneak" => command = Command::Unsneak,
"sneak" | "shift" | "crouch" => command = Command::Sneak,
"unsneak" | "unshift" | "uncrouch" => command = Command::Unsneak,
"interact_block" => command = Command::InteractBlock,
"interact_entity" => command = Command::InteractEntity,
"attack" => command = Command::Attack,
"attack" | "hit" => command = Command::Attack,
"jump" => command = Command::Jump,
"walk" => command = Command::Walk,
"sprint" => command = Command::Sprint,
"drop_item" => command = Command::DropItem,
"drop_stack" => command = Command::DropStack,
"leave_bed" => command = Command::LeaveBed,
"script" => command = Command::Script,
"latency" => command = Command::Latency,
"script" | "run" => command = Command::Script,
"latency" | "ping" => command = Command::Latency,
"mob_locations" => command = Command::MobLocations,
"toggle_alert_messages" => command = Command::ToggleAlertMessages,
"toggle_bot_status_messages" => command = Command::ToggleBotStatusMessages,