Attempt to fix "I love cheese" bug

This commit is contained in:
Jeff 2024-07-02 14:20:30 -04:00
parent f7ce6f5981
commit c1e15672a8

View File

@ -142,17 +142,13 @@ impl Bot {
if content == "cheese" { if content == "cheese" {
info!("{} loves cheese!", sender_info.player_alias); info!("{} loves cheese!", sender_info.player_alias);
let uid = self.find_uid(&sender_info.player_alias)?; let content = format!("{} loves cheese!", sender_info.player_alias);
if self.client.group_members().contains_key(&uid) { match &message.chat_type {
let content = format!("{} loves cheese!", sender_info.player_alias); ChatType::Tell(_, _) | ChatType::Say(_) => {
self.client.send_command("say".to_string(), vec![content])
match &message.chat_type {
ChatType::Tell(_, _) | ChatType::Say(_) => {
self.client.send_command("say".to_string(), vec![content])
}
_ => self.client.send_command("group".to_string(), vec![content]),
} }
_ => self.client.send_command("group".to_string(), vec![content]),
} }
return Ok(()); return Ok(());