make the bot more bettererererer
This commit is contained in:
parent
d971c98a5f
commit
711d03d16a
|
@ -87,6 +87,10 @@ pub async fn handle_message(p: ChatPacket, client: &mut Client, config: &Arc<RwL
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.uuid() == Some(config.read().await.relay.uuid) && components[0].starts_with('@') {
|
||||||
|
components.remove(0);
|
||||||
|
}
|
||||||
|
|
||||||
let is_for_me = components[0].starts_with(&format!("!@{}", config.read().await.relay.username)) || (!components[0].starts_with("!@") && components[0].starts_with("!"));
|
let is_for_me = components[0].starts_with(&format!("!@{}", config.read().await.relay.username)) || (!components[0].starts_with("!@") && components[0].starts_with("!"));
|
||||||
|
|
||||||
if !is_for_me { return; }
|
if !is_for_me { return; }
|
||||||
|
|
Loading…
Reference in New Issue