fix
This commit is contained in:
10
main.py
10
main.py
@@ -77,9 +77,11 @@ def chatglmApi(msg, data, group, account_wxid, wxid, wx_name):
|
||||
if "/img" in msg:
|
||||
newanswer = re.sub(r'#web_img\s+', '', answer)
|
||||
# 发送 @ 消息
|
||||
WXBotService.send_at_message(robot_wxid=account_wxid,
|
||||
WXBotService.send_at_message(
|
||||
robot_wxid=account_wxid,
|
||||
from_wxid=group,
|
||||
msg=f'@{wx_name} ,{newmsg}=>图片已生成 \n [本消息是机器人bot自动回复]',
|
||||
msg=
|
||||
f'@{wx_name} ,{newmsg}=>图片已生成 \n [本消息是机器人bot自动回复]',
|
||||
wx_list=wxid)
|
||||
WXBotService.send_image_message(
|
||||
robot_wxid=account_wxid,
|
||||
@@ -290,9 +292,13 @@ def h5group(nickname, db: Session = Depends(get_db)):
|
||||
groupList = WXBotService.get_group_members_list(
|
||||
robot_wxid=config.account_wxid, from_wxid=config.chatroomId)
|
||||
# print('groupList', groupList)
|
||||
if groupList['data'] is not None:
|
||||
for groupItem in groupList['data']:
|
||||
if groupItem['nickname'] == matchesString:
|
||||
inGroup = True
|
||||
else:
|
||||
print("Error: 'data' is None.")
|
||||
|
||||
if inGroup:
|
||||
return {"code": 200, "success": "fail", "message": "已经在群聊中"}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user