gitea_push2qq/command.py

16 lines
409 B
Python
Raw Normal View History

2023-12-19 00:48:03 +08:00
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