指令处理
This commit is contained in:
11
robot.py
11
robot.py
@@ -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("/"):
|
||||
|
||||
Reference in New Issue
Block a user