antiprefixer

This commit is contained in:
Skye 2023-03-19 09:46:03 +09:00
parent 7238073b68
commit 73acb42bd6
Signed by: me
GPG key ID: 0104BC05F41B77B8

View file

@ -155,7 +155,11 @@ impl EventHandler for Handler {
.await .await
.unwrap(); .unwrap();
let response = response.choices[0].message.content.as_str(); let mut response = response.choices[0].message.content.as_str();
if let Some(unprefixed) = response.strip_prefix("Smolhaj: ") {
response = unprefixed;
}
let is_appropriate = !self let is_appropriate = !self
.client .client