# 兼容不@ 直接/触发指令,回答问题。
This commit is contained in:
11
robot.py
11
robot.py
@@ -234,6 +234,17 @@ class Robot(Job):
|
||||
except Exception as e:
|
||||
self.LOG.error(f"revoke_receive_message error: {e}")
|
||||
|
||||
# 兼容不@ 直接/触发指令,回答问题。
|
||||
try:
|
||||
if msg.content.startswith("/"):
|
||||
# 因为内容中存在空格指令,所以不能使用
|
||||
self.LOG.info(f"msg.content:{msg.content}\n game_message: {msg.content}")
|
||||
resp = game_process_message(group_id=msg.roomid, player_id=msg.sender, message=msg.content,
|
||||
player_name=self.allContacts.get(msg.sender, msg.sender))
|
||||
self.sendTextMsg(resp, msg.roomid, msg.sender)
|
||||
return
|
||||
except Exception as e:
|
||||
self.LOG.error(f"game_message_load error:{e}")
|
||||
try:
|
||||
# TODO 群人员添加也是消息类型10000的消息
|
||||
result = self.gmc.process_message(msg.roomid, msg.xml)
|
||||
|
||||
Reference in New Issue
Block a user