make the bot more bettererererer

This commit is contained in:
core 2023-07-17 19:41:10 -04:00
parent d971c98a5f
commit 711d03d16a
Signed by: core
GPG Key ID: FDBF740DADDCEECF
1 changed files with 4 additions and 0 deletions

View File

@ -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; }