| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import logging
- import console
- import conf
- SERVICES = []
- def init_services(cclient):
- global SERVICES
- SERVICES = [
- console.Console(cclient),
- ]
- if conf.SOUND_OUTPUT_ENABLED:
- import audio_output
- SERVICES.append(audio_output.AudioOutput())
- if conf.SLACK_BOT_API_KEY:
- import slack_bot
- SERVICES.append(slack_bot.SlackBot())
- def success():
- for service in SERVICES:
- service.success()
- def failure(s=None):
- for service in SERVICES:
- service.failure(s)
- def cancelled():
- for service in SERVICES:
- service.cancelled()
- def tts(s):
- for service in SERVICES:
- service.tts(s)
- def text(s):
- for service in SERVICES:
- service.text(s)
- def debug(s):
- for service in SERVICES:
- service.debug(s)
|