Skip to content

Instantly share code, notes, and snippets.

@Scofield-Idehen
Created June 2, 2022 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Scofield-Idehen/1ce87fedf2c71325ccd4cf8ed1e0dda7 to your computer and use it in GitHub Desktop.
Save Scofield-Idehen/1ce87fedf2c71325ccd4cf8ed1e0dda7 to your computer and use it in GitHub Desktop.
from datetime import datetime
def sample_responses(input_text):
user_message = str(input_text).lower()
if user_message in ("hello", "hi", "sup"):
return "Hey! Wh o goes you!!!"
if user_message in ("who are you", "can you help me", "who are you"):
return "I am a bot, how can i help you!!!"
if user_message in ("time", "time?", "date?"):
now = datetime.now()
date_time = now.strtime("%d/%m/%y, %H:%M:%S")
return str(date_time)
return "Please type something the human mind can comprehend"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment