mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-24 11:07:14 +00:00
feat: 消息平台适配器可扩展性
This commit is contained in:
@@ -22,6 +22,8 @@ def adapter_class(
|
|||||||
|
|
||||||
|
|
||||||
class MessageSourceAdapter(metaclass=abc.ABCMeta):
|
class MessageSourceAdapter(metaclass=abc.ABCMeta):
|
||||||
|
"""消息平台适配器基类"""
|
||||||
|
|
||||||
name: str
|
name: str
|
||||||
|
|
||||||
bot_account_id: int
|
bot_account_id: int
|
||||||
@@ -40,7 +42,7 @@ class MessageSourceAdapter(metaclass=abc.ABCMeta):
|
|||||||
target_id: str,
|
target_id: str,
|
||||||
message: mirai.MessageChain
|
message: mirai.MessageChain
|
||||||
):
|
):
|
||||||
"""发送消息
|
"""主动发送消息
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
target_type (str): 目标类型,`person`或`group`
|
target_type (str): 目标类型,`person`或`group`
|
||||||
|
|||||||
Reference in New Issue
Block a user