mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-19 02:12:46 +08:00
30 lines
568 B
Python
30 lines
568 B
Python
import abc
|
|
|
|
class Platform():
|
|
def __init__(self, message_handler: callable) -> None:
|
|
'''
|
|
初始化平台的各种接口
|
|
'''
|
|
self.message_handler = message_handler
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def handle_msg():
|
|
'''
|
|
处理到来的消息
|
|
'''
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def reply_msg():
|
|
'''
|
|
回复消息(被动发送)
|
|
'''
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def send_msg():
|
|
'''
|
|
发送消息(主动发送)
|
|
'''
|
|
pass |