#89 added adittional dialogs for response to 'thanks'
parent
7390ea5cc9
commit
a2324352a7
|
@ -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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Any time.
|
|
@ -0,0 +1 @@
|
||||||
|
Glad to be of service.
|
|
@ -0,0 +1 @@
|
||||||
|
Glad to help.
|
|
@ -0,0 +1 @@
|
||||||
|
My Pleasure.
|
|
@ -0,0 +1 @@
|
||||||
|
No problem.
|
Loading…
Reference in New Issue