diff --git a/src/commands/mod.rs b/src/commands/mod.rs index b9399b8..51f9e46 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -81,6 +81,17 @@ Servers: {}", env!("CARGO_PKG_VERSION"), guilds))?; Ok(()) } +pub fn wc_help(msg: &Message) -> Result<(), Error> { + msg.channel_id.say("Command overview: (prefix is wc!) +- Get information: guild , player , territory <(partial) name>, topguilds +- Toggle territory or war logs: livefeed, unlivefeed, warfeed, unwarfeed +- Crop screenshots: crop (crops last posted picture), crop +- Misc.: info, status +Visit the Discord for more help: https://discord.gg/GbN7HeG")?; + + Ok(()) +} + pub fn wc_crop(command: &str, msg: &Message) -> Result<(), Error> { let url = &command[5..]; let new_url = reqwest::get(&format!("https://wynncraft-autocrop.herokuapp.com/crop?url={}", url))?.text().unwrap(); @@ -117,7 +128,7 @@ pub fn wc_shout(command: &str, msg: &Message) -> Result<(), Error> { let mut bots = vec![]; let mut general = vec![]; let mut others = vec![]; - for (channel_id, channel) in Guild::get(&guild_id).unwrap().channels().unwrap() { + for (_channel_id, channel) in Guild::get(&guild_id).unwrap().channels().unwrap() { if channel.kind != ChannelType::Text { continue; } diff --git a/src/main.rs b/src/main.rs index b653600..d518555 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,8 +101,10 @@ impl Handler { wc_livefeed(msg)?; } else if command == "unlivefeed" { wc_unlivefeed(msg)?; - } else if command == "info" || command == "help" || command == "" { + } else if command == "info" || command == "" { wc_info(msg)?; + } else if command == "help" { + wc_help(msg)?; } else if command.starts_with("crop ") { wc_crop(command, msg)?; } else if command == "crop" {