Search newer guilds first
This commit is contained in:
parent
6b035809ea
commit
7a6f05ac70
@ -100,7 +100,7 @@ fn guild_by_prefix(prefix: &str) -> Result<Option<String>, Error> {
|
||||
return Ok(Some(guild.get("name").unwrap().as_str().unwrap().to_owned()));
|
||||
}
|
||||
}
|
||||
for guild in guilds.get("guilds").unwrap().as_array().unwrap() {
|
||||
for guild in guilds.get("guilds").unwrap().as_array().unwrap().into_iter().rev() {
|
||||
if guild.get("prefix").unwrap().as_str().unwrap().to_lowercase() == prefix.to_lowercase() {
|
||||
return Ok(Some(guild.get("name").unwrap().as_str().unwrap().to_owned()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user