群机器人管理能力补充。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user