if body.include? "hi"
message = greetings.sample + "I'm ToTo ๐ฐ. I reveal some 'fact' about Suzanne ๐ท or 'joke' with you all day ๐ or find you some interesting gifs ๐"
elsif body.include? "who"
message = "I am ToTo ๐ฐ, Suzanne's personal concierge ๐. Suzanne is a 2nd-yr MDES student at Carnegie Mellon University. You can reply 'fact' to learn more about Suzanne!"
elsif body.include? "where"
message = "I live somewhere in the Cloud โ๏ธ, but Suzanne lives in Pittsburgh ๐, a old and rusty town in Pennsylvania."
elsif body.include? "when"
message = "I was created in Fall 2018 during Programming for Online Prototyping class ๐ฅ! Suzanne was born on July 13, 1990 ๐."
elsif body.include? "why"
message = "I was made to reveal some 'fact' about Suzanne ๐คน๐ปโโ๏ธ. I can also 'joke' with you or find you 'gifs' all day, all year."
elsif body.include? "favorite food"
message = "Suzanne's favorite food is sushi ๐ฃ. She also like wine ๐ท and sake ๐ถ."
elsif body.include? "likes"
message = "Suzanne likes flowers ๐น, especially white roses. She also likes shiny little things ๐."
elsif body.include? "hates"
message = "Suzanne hates pizza ๐. Oh, she hates nature too โฐ๏ธ. Yes, she really does."
elsif body.include? "place"
message = "Suzanne's favorite place is Paris, France โฒ. Next is Kyoto, Japan โฉ๏ธ!"
elsif body.include? "rombi"
message = "Rombi is Suzanne's one and only precious puppy ๐ถ. Rombi little poodle who is 3 years old ๐พ."
elsif body.include? "what"
"You can ask simple questions like 'what', 'who', 'when', 'where', and 'why' to get to know more about me or Suzanne. I can also 'joke' with you or tell you 'fact' about Suzanne ๐ท. If you'd like to see some gifs, just tell me anything-you will be surprised what I can find for you ๐คน๐ปโโ๏ธ."
elsif body.include? "joke"
array_of_lines = IO.readlines("jokes.txt")
message = array_of_lines.sample + laugh.sample
elsif body.include? "fact"
array_of_lines = IO.readlines("facts.txt")
message = array_of_lines.sample
else
results = Giphy.search( body )
unless results.empty?
gif = results.sample.fixed_width_downsampled_image.url.to_s
message = "I chose this gif for your search! Hope you like it ๐ฐ. Powered by Giphy.com."
end
end
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .