群机器人管理能力补充。
This commit is contained in:
@@ -150,6 +150,9 @@ def api_add_group():
|
|||||||
return jsonify({"success": False, "error": "群组ID不能为空"}), 400
|
return jsonify({"success": False, "error": "群组ID不能为空"}), 400
|
||||||
|
|
||||||
group_id = group_id.strip()
|
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"]:
|
if group_id in GroupBotManager.local_cache["group_list"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user