Skip to content

Commit f44961d

Browse files
authored
feat: add LINE platform support with adapter and configuration (#5085)
1 parent 0c7a95c commit f44961d

8 files changed

Lines changed: 973 additions & 0 deletions

File tree

astrbot/core/config/default.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"wecom_ai_bot",
1616
"slack",
1717
"lark",
18+
"line",
1819
]
1920

2021
# 默认配置
@@ -415,6 +416,7 @@ class ChatProviderTemplate(TypedDict):
415416
"slack_webhook_port": 6197,
416417
"slack_webhook_path": "/astrbot-slack-webhook/callback",
417418
},
419+
# LINE's config is located in line_adapter.py
418420
"Satori": {
419421
"id": "satori",
420422
"type": "satori",

astrbot/core/platform/manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ async def load_platform(self, platform_config: dict) -> None:
176176
from .sources.satori.satori_adapter import (
177177
SatoriPlatformAdapter, # noqa: F401
178178
)
179+
case "line":
180+
from .sources.line.line_adapter import (
181+
LinePlatformAdapter, # noqa: F401
182+
)
179183
except (ImportError, ModuleNotFoundError) as e:
180184
logger.error(
181185
f"加载平台适配器 {platform_config['type']} 失败,原因:{e}。请检查依赖库是否安装。提示:可以在 管理面板->平台日志->安装Pip库 中安装依赖库。",

0 commit comments

Comments
 (0)