菜单还是支持群里发送。
This commit is contained in:
4
robot.py
4
robot.py
@@ -237,7 +237,7 @@ class Robot(Job):
|
|||||||
rsp = self.gbm.handle_command(msg.roomid, msg.content)
|
rsp = self.gbm.handle_command(msg.roomid, msg.content)
|
||||||
# 不在群里发送,防止被骚扰
|
# 不在群里发送,防止被骚扰
|
||||||
if rsp is not None:
|
if rsp is not None:
|
||||||
self.send_text_msg(rsp, msg.sender)
|
self.send_text_msg(rsp, msg.roomid, msg.sender)
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.LOG.error(f"revoke_receive_message error: {e}")
|
self.LOG.error(f"revoke_receive_message error: {e}")
|
||||||
@@ -379,7 +379,7 @@ class Robot(Job):
|
|||||||
"""刷新联系人信息"""
|
"""刷新联系人信息"""
|
||||||
self.allContacts = self.get_all_contacts()
|
self.allContacts = self.get_all_contacts()
|
||||||
self.all_head_img = self.get_all_head_img_url()
|
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("联系人信息已刷新")
|
self.LOG.info("联系人信息已刷新")
|
||||||
|
|
||||||
def send_group_txt_message(self, msg: str, feature: Feature):
|
def send_group_txt_message(self, msg: str, feature: Feature):
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class GroupBotManager:
|
|||||||
|
|
||||||
# 如果是MENU指令,返回功能列表
|
# 如果是MENU指令,返回功能列表
|
||||||
if command_str.strip().upper() == "菜单":
|
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指令,返回功能列表及其状态
|
# 如果是MENU-STATUS指令,返回功能列表及其状态
|
||||||
if command_str.strip().upper() == "菜单状态":
|
if command_str.strip().upper() == "菜单状态":
|
||||||
|
|||||||
Reference in New Issue
Block a user