群机器人管理能力补充。

This commit is contained in:
liuwei
2025-04-03 17:48:46 +08:00
parent 2fafe2981b
commit 2dc2631f76

View File

@@ -150,7 +150,10 @@ def api_add_group():
return jsonify({"success": False, "error": "群组ID不能为空"}), 400
group_id = group_id.strip()
#如果group_id 不是@chatroom 结尾,这提示错误
if not group_id.endswith("@chatroom"):
return jsonify({"success": False, "error": "群组ID必须以 @chatroom 结尾"}), 400
# 检查群组是否已存在
if group_id in GroupBotManager.local_cache["group_list"]:
return jsonify({"success": False, "error": "该群组已存在"}), 400