pass pytest

This commit is contained in:
MuXinCG
2026-02-16 19:54:39 +08:00
parent 2ee50e3c4f
commit f39556afa0
+8 -8
View File
@@ -35,6 +35,14 @@ class SlackChannel(Channel):
self._typing_message_ts: dict[str, str] = {}
async def start(self) -> None:
if not self.config.bot_token:
raise ChannelError("Slack bot token is required")
if not self.config.app_token:
raise ChannelError(
"Slack app token is required for Socket Mode "
"(starts with xapp-)"
)
try:
from slack_sdk.web.async_client import AsyncWebClient
from slack_sdk.socket_mode.aiohttp import SocketModeClient
@@ -46,14 +54,6 @@ class SlackChannel(Channel):
"Install with: pip install evoscientist[slack]"
)
if not self.config.bot_token:
raise ChannelError("Slack bot token is required")
if not self.config.app_token:
raise ChannelError(
"Slack app token is required for Socket Mode "
"(starts with xapp-)"
)
self._web_client = AsyncWebClient(
token=self.config.bot_token,
proxy=self._get_proxy(),