debug 游戏命令

This commit is contained in:
liuwei
2025-02-21 16:51:56 +08:00
parent 924ad911df
commit 3ae7e8469a

View File

@@ -149,12 +149,15 @@ class Robot(Job):
# 所有人员都可以要求他撤回刚刚的信息
if msg.from_group() and q.startswith("/"):
# 因为内容中存在空格指令所以不能使用q
game_message = re.sub(r"@.*?[\u2005|\s]", "", msg.content)
self.LOG.info(f"msg.content:{msg.content}\n game_message: {game_message}")
resp = game_process_message(group_id=msg.roomid, player_id=msg.sender, message=game_message,
player_name=self.allContacts.get(msg.sender, msg.sender))
self.sendTextMsg(resp.get("message"), msg.roomid, msg.sender)
try:
# 因为内容中存在空格指令所以不能使用q
game_message = re.sub(r"@.*?[\u2005|\s]", "", msg.content)
self.LOG.info(f"msg.content:{msg.content}\n game_message: {game_message}")
resp = game_process_message(group_id=msg.roomid, player_id=msg.sender, message=game_message,
player_name=self.allContacts.get(msg.sender, msg.sender))
self.sendTextMsg(resp.get("message"), msg.roomid, msg.sender)
except Exception as e:
self.LOG.error(f"game_message_load error{e}")
return True
if q == "#今日百度新闻":
self.newsBaiduReport((msg.roomid if msg.from_group() else msg.sender))