perf: 结构化插件的表示格式; 优化插件开发接口

This commit is contained in:
Soulter
2024-03-12 18:50:50 +08:00
parent 1af481f5f9
commit e643eea365
22 changed files with 457 additions and 215 deletions
+4 -4
View File
@@ -20,28 +20,28 @@ class Platform():
pass
@abc.abstractmethod
def handle_msg():
async def handle_msg():
'''
处理到来的消息
'''
pass
@abc.abstractmethod
def reply_msg():
async def reply_msg():
'''
回复消息(被动发送)
'''
pass
@abc.abstractmethod
def send_msg():
async def send_msg(target: Union[GuildMessage, GroupMessage, FriendMessage, str], message: Union[str, list]):
'''
发送消息(主动发送)
'''
pass
@abc.abstractmethod
def send():
async def send(target: Union[GuildMessage, GroupMessage, FriendMessage, str], message: Union[str, list]):
'''
发送消息(主动发送)同 send_msg()
'''