~raboof/chatbot-dialogue

94cc349ec3ca05116ff84958717b65084063d81c — Arnout Engelen 10 months ago 9b6ecd9
Diagnostic logging, avoid proposing an in-chat game
1 files changed, 8 insertions(+), 1 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +8 -1
@@ 87,7 87,14 @@ impl Pandora {
        match pandorares.responses.get(0) {
            Some(response) => {
                let s = re.replace_all(response, "");
                self.response = s.into_owned();
                if s.starts_with("Image from") {
                    print!("Sus pandora response: {:?}", pandorares);
                }
                if s.starts_with("I can currently play these games") {
                    self.response = "I love playing games! What games do you like yourself?".to_owned();
                } else {
                    self.response = s.into_owned();
                }
                Ok(self)
            },
            None => {