diff --git a/src/main.rs b/src/main.rs index ec36ed3..b02f543 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,7 +141,17 @@ impl Handler { if !msg.content.starts_with(&prefix) { return Ok(()); } - let command = &msg.content[prefix.len()..]; + let mut command = msg.content[prefix.len()..].to_owned(); + if command.starts_with("territories ") { + command = command.replacen("territories", "guild", 1); + } + if command.starts_with("top ") { + command = command.replacen("top", "topguilds", 1); + } + if command.starts_with("leaderboard ") { + command = command.replacen("leaderboard", "topguilds", 1); + } + let command = &command; if command.starts_with("guild") { wc_guild(command, msg)?; @@ -180,7 +190,7 @@ impl Handler { } else if command.starts_with("prefix") { wc_prefix(command, msg)?; } else { - let commands = ["topguilds", "prefix", "warfeed", "unwarfeed", "livefeed", "unlivefeed", "status", "crop", "guild", "player", "territory", "info", "help"]; + let commands = ["topguilds", "leaderboard", "top", "prefix", "warfeed", "unwarfeed", "livefeed", "unlivefeed", "status", "crop", "guild", "territories", "player", "territory", "info", "help"]; let mut min = usize::max_value(); let mut min_command = "help"; for command_b in &commands {