Improve help error message

This commit is contained in:
Sakuhl 2018-02-03 23:48:02 +01:00
parent d8a58e8977
commit 1307f1a61f

View File

@ -82,7 +82,7 @@ Servers: {}", env!("CARGO_PKG_VERSION"), guilds))?;
} }
pub fn wc_help(msg: &Message) -> Result<(), Error> { pub fn wc_help(msg: &Message) -> Result<(), Error> {
msg.author.dm(|f| f.content("Command overview: (prefix is wc!) if let Err(_) = msg.author.dm(|f| f.content("Command overview: (prefix is wc!)
Get information: Get information:
guild <name/prefix> - show guild stats and territories guild <name/prefix> - show guild stats and territories
@ -103,10 +103,12 @@ Misc.:
info - show bot info info - show bot info
status - show online players status - show online players
Visit the Discord for more help: https://discord.gg/GbN7HeG"))?; Visit the Discord for more help: https://discord.gg/GbN7HeG")) {
bail!("could not send DM");
} else {
Ok(()) Ok(())
} }
}
pub fn wc_crop(command: &str, msg: &Message) -> Result<(), Error> { pub fn wc_crop(command: &str, msg: &Message) -> Result<(), Error> {
let url = &command[5..]; let url = &command[5..];