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