Ignore case when looking up by prefix

This commit is contained in:
Sakuhl 2018-01-02 23:21:27 +01:00
parent 97d6bb6a07
commit d807866e40

View File

@ -25,7 +25,7 @@ pub fn guild_by_prefix(prefix: &str) -> Result<Option<GuildEntry>, Box<Error>> {
let top_100 = guild_leaderboard()?; let top_100 = guild_leaderboard()?;
for guild in top_100.data.into_iter() { 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)); return Ok(Some(guild));
} }
} }