from typing import Dict, Any, Optional from model import Message def command_convert(data: Dict[str, Any]) -> Optional[Message]: match (data.get('message').get('content')): case '/bot': # 测试存活 return Message(content='icalingua bot test', room_id=data['roomId']) case ['/gitea validate', '-v']: return Message() case _: return None