指令处理

This commit is contained in:
liuwei
2025-03-19 16:45:43 +08:00
parent bb98d6b802
commit b1a1d41d0f

View File

@@ -283,6 +283,17 @@ class Robot(Job):
except Exception as e:
self.LOG.error(f"archive_message error: {e}")
# 记录在群里发的最新消息,可以通过撤回指令撤回
try:
if msg.from_self():
rsp = self.gbm.handle_command(msg.roomid, msg.content)
# 不在群里发送,防止被骚扰
if rsp is not None:
self.send_text_msg(rsp, msg.sender)
return
except Exception as e:
self.LOG.error(f"revoke_receive_message error: {e}")
# 兼容不@ 直接/触发指令,回答问题。
try:
if msg.content.startswith("/"):