#89 added adittional dialogs for response to 'thanks'

pull/106/head
Eugene R. Miller 2016-06-06 15:48:16 -06:00
parent 7390ea5cc9
commit a2324352a7
6 changed files with 18 additions and 1 deletions

View File

@ -20,8 +20,10 @@ from os.path import dirname
from adapt.intent import IntentBuilder from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill from mycroft.skills.core import MycroftSkill
from mycroft.util.log import getLogger from mycroft.util.log import getLogger
from random import randint
__author__ = 'eward' __author__ = 'eward'
# 2016-06-06 added random responses
LOGGER = getLogger(__name__) LOGGER = getLogger(__name__)
@ -38,7 +40,17 @@ class WelcomeSkill(MycroftSkill):
self.register_intent(welcome_intent, self.handle_welcome_intent) self.register_intent(welcome_intent, self.handle_welcome_intent)
def handle_welcome_intent(self, message): def handle_welcome_intent(self, message):
self.speak_dialog('Welcome') dialogs = [
"AnyTime",
"GladToBeOfService",
"GladToHelp",
"MyPleasure",
"NoProblem",
"Welcome",
]
idx = randint(0, len(dialogs) - 1)
dialog = dialogs[idx]
self.speak_dialog(dialog)
def stop(self): def stop(self):
pass pass

View File

@ -0,0 +1 @@
Any time.

View File

@ -0,0 +1 @@
Glad to be of service.

View File

@ -0,0 +1 @@
Glad to help.

View File

@ -0,0 +1 @@
My Pleasure.

View File

@ -0,0 +1 @@
No problem.