first commit

This commit is contained in:
2024-02-19 23:43:53 +02:00
commit 435d4317e9
9 changed files with 359 additions and 0 deletions

View 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")

View 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