From d807866e4069ce206f34229cf92445562a35f458 Mon Sep 17 00:00:00 2001 From: Sakuhl <2012collector@gmail.com> Date: Tue, 2 Jan 2018 23:21:27 +0100 Subject: [PATCH] Ignore case when looking up by prefix --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 331c419..495399c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,7 @@ pub fn guild_by_prefix(prefix: &str) -> Result, Box> { let top_100 = guild_leaderboard()?; for guild in top_100.data.into_iter() { - if guild.prefix == prefix { + if guild.prefix.to_ascii_lowercase() == prefix.to_ascii_lowercase() { return Ok(Some(guild)); } }