菜单还是支持群里发送。
This commit is contained in:
6
robot.py
6
robot.py
@@ -205,7 +205,7 @@ class Robot(Job):
|
||||
|
||||
# 标记插件是否处理了消息
|
||||
plugin_processed = False
|
||||
|
||||
|
||||
# 尝试使用插件处理消息
|
||||
if self.process_plugin_message(msg):
|
||||
plugin_processed = True
|
||||
@@ -237,7 +237,7 @@ class Robot(Job):
|
||||
rsp = self.gbm.handle_command(msg.roomid, msg.content)
|
||||
# 不在群里发送,防止被骚扰
|
||||
if rsp is not None:
|
||||
self.send_text_msg(rsp, msg.sender)
|
||||
self.send_text_msg(rsp, msg.roomid, msg.sender)
|
||||
return
|
||||
except Exception as e:
|
||||
self.LOG.error(f"revoke_receive_message error: {e}")
|
||||
@@ -379,7 +379,7 @@ class Robot(Job):
|
||||
"""刷新联系人信息"""
|
||||
self.allContacts = self.get_all_contacts()
|
||||
self.all_head_img = self.get_all_head_img_url()
|
||||
self.contact_manager.refresh_contacts(self.allContacts,self.all_head_img, self.wcf)
|
||||
self.contact_manager.refresh_contacts(self.allContacts, self.all_head_img, self.wcf)
|
||||
self.LOG.info("联系人信息已刷新")
|
||||
|
||||
def send_group_txt_message(self, msg: str, feature: Feature):
|
||||
|
||||
@@ -148,7 +148,7 @@ class GroupBotManager:
|
||||
|
||||
# 如果是MENU指令,返回功能列表
|
||||
if command_str.strip().upper() == "菜单":
|
||||
return f"群ID:{group_id} \n {GroupBotManager.display_menu_status(group_id)}"
|
||||
return f"群ID:{group_id} \n {GroupBotManager.get_enabled_features(group_id)}"
|
||||
|
||||
# 如果是MENU-STATUS指令,返回功能列表及其状态
|
||||
if command_str.strip().upper() == "菜单状态":
|
||||
|
||||
Reference in New Issue
Block a user