Skip to content

Commit 545f6fd

Browse files
committed
🎨 入群检测代码优化
1 parent 4c7c223 commit 545f6fd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

zhenxun/builtin_plugins/platform/qq/group_handle/data_source.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ async def __handle_add_group(
4949
group: GroupConsole
5050
"""
5151
if group:
52-
await GroupConsole.filter(
53-
group_id=group_id, channel_id__isnull=True
54-
).update(group_flag=1)
52+
group.group_flag = 1
53+
await group.save(update_fields=["group_flag"])
5554
else:
5655
block_plugin = ""
5756
if plugin_list := await PluginInfo.filter(default_status=False).all():

0 commit comments

Comments
 (0)