feat(wecom): add wecom channel [wobsocket]
support text/audio[wecom support audio message by default]
This commit is contained in:
@@ -7,7 +7,6 @@ from typing import Any
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from nanobot.bus.events import OutboundMessage
|
||||
from nanobot.bus.queue import MessageBus
|
||||
from nanobot.channels.base import BaseChannel
|
||||
from nanobot.config.schema import Config
|
||||
@@ -150,6 +149,19 @@ class ChannelManager:
|
||||
except ImportError as e:
|
||||
logger.warning("Matrix channel not available: {}", e)
|
||||
|
||||
# WeCom channel
|
||||
if self.config.channels.wecom.enabled:
|
||||
try:
|
||||
from nanobot.channels.wecom import WecomChannel
|
||||
self.channels["wecom"] = WecomChannel(
|
||||
self.config.channels.wecom,
|
||||
self.bus,
|
||||
groq_api_key=self.config.providers.groq.api_key,
|
||||
)
|
||||
logger.info("WeCom channel enabled")
|
||||
except ImportError as e:
|
||||
logger.warning("WeCom channel not available: {}", e)
|
||||
|
||||
self._validate_allow_from()
|
||||
|
||||
def _validate_allow_from(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user