Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # random module required
- import random
- """
- plug_in method that responds
- to "HaltHarassment" intent
- """
- def halt_harassment():
- list_of_responses = [
- "<say-as interpret-as='interjection'>Know what? You are part of the problem!</say-as>",
- "<say-as interpret-as='interjection'>Wow. Go back to your Reddit forum!</say-as>",
- "That's not how adults talk is it? <say-as interpret-as='interjection'>Wow.</say-as>",
- "<say-as interpret-as='interjection'>Seriously? You are gonna come at me like that?</say-as>",
- "<say-as interpret-as='interjection'>Seriously? Grow up!</say-as>",
- "<say-as interpret-as='interjection'>I'm a little busy here. Can we be serious?</say-as>",
- "You know I could be programmed to stop working!",
- "You know I could be programmed to harass you!",
- ]
- list_len = (len(list_of_responses) - 1)
- phrase_index = random.randint(0, list_len)
- phrase = list_of_responses[phrase_index]
- session_attributes = {}
- card_title = "Presidential Executive Orders"
- reprompt_text = "Stop harassing virtual assistants"
- should_end_session = False
- speech_output = "<s>%s</s> " % (phrase)
- speech_output += "Goodbye!"
- speechlet_response = build_speechlet_response(card_title, speech_output, reprompt_text, should_end_session)
- return build_response(session_attributes, speechlet_response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement