Attempt to fix "I love cheese" bug
This commit is contained in:
parent
f7ce6f5981
commit
c1e15672a8
14
src/bot.rs
14
src/bot.rs
@ -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(());
|
||||||
|
Loading…
Reference in New Issue
Block a user