first commit
This commit is contained in:
39
ovos_PHAL_plugin_discord_bot/__init__.py
Normal file
39
ovos_PHAL_plugin_discord_bot/__init__.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import requests
|
||||
|
||||
from ovos_plugin_manager.phal import PHALPlugin
|
||||
from ovos_config.config import LocalConf
|
||||
from ovos_config.locations import get_webcache_location
|
||||
from ovos_utils.messagebus import Message
|
||||
from ovos_utils.log import LOG
|
||||
from ovos_utils import classproperty
|
||||
from ovos_utils.process_utils import RuntimeRequirements
|
||||
|
||||
|
||||
class DiscordBotPlugin(PHALPlugin):
|
||||
def __init__(self, bus=None, config=None):
|
||||
super().__init__(bus, "ovos-PHAL-plugin-discord-bot", config)
|
||||
self.web_config = LocalConf(get_webcache_location())
|
||||
self.bus.on("mycroft.internet.connected", self.on_reset)
|
||||
self.bus.on("recognizer_loop:utterance", self.on_utterance)
|
||||
|
||||
@classproperty
|
||||
def runtime_requirements(self):
|
||||
return RuntimeRequirements(internet_before_load=True,
|
||||
network_before_load=True,
|
||||
requires_internet=True,
|
||||
requires_network=True,
|
||||
no_internet_fallback=False,
|
||||
no_network_fallback=False)
|
||||
|
||||
def on_reset(self, message=None):
|
||||
LOG.info(f"On reset triggered")
|
||||
|
||||
def on_utterance(self, message=None):
|
||||
LOG.info(f"On utterance triggered")
|
||||
|
||||
def on_speak(self, message=None):
|
||||
LOG.info(f"On speak triggered")
|
||||
|
||||
|
||||
|
||||
|
||||
7
ovos_PHAL_plugin_discord_bot/version.py
Normal file
7
ovos_PHAL_plugin_discord_bot/version.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# The following lines are replaced during the release process.
|
||||
# START_VERSION_BLOCK
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 0
|
||||
VERSION_BUILD = 0
|
||||
VERSION_ALPHA = 1
|
||||
# END_VERSION_BLOCK
|
||||
Reference in New Issue
Block a user