-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
33 lines (25 loc) · 930 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from mycroft.skills.core import FallbackSkill
class MeaningFallback(FallbackSkill):
"""
A Fallback skill to answer the question about the
meaning of life, the universe and everything.
"""
def __init__(self):
super(MeaningFallback, self).__init__(name='Meaning Fallback')
def initialize(self):
"""
Registers the fallback skill
"""
self.register_fallback(self.handle_fallback, 90)
# Any other initialize code goes here
def handle_fallback(self, message):
self.speak('Test skill', expect_response=True)
return True # Indicate that the utterance was handled
def shutdown(self):
"""
Remove this skill from list of fallback skills.
"""
self.remove_fallback(self.handle_fallback)
super(MeaningFallback, self).shutdown()
def create_skill():
return MeaningFallback()