mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
补充群认证同样问题
This commit is contained in:
parent
5a9beb2e5c
commit
898d7b40b3
@ -166,7 +166,8 @@ async def _(bot: Bot):
|
||||
for group_id in _gl:
|
||||
if group_id in group_list:
|
||||
if group := await GroupInfo.get_or_none(group_id=group_id):
|
||||
await group.update_or_create(group_flag=1)
|
||||
group.group_flag = 1
|
||||
await group.save(update_fields=["group_flag"])
|
||||
else:
|
||||
group_info = await bot.get_group_info(group_id=group_id)
|
||||
await GroupInfo.create(
|
||||
|
||||
@ -109,8 +109,9 @@ async def _(
|
||||
if cmd[:2] == "同意":
|
||||
rid = requests_manager.get_group_id(id_)
|
||||
if rid:
|
||||
if group := await GroupInfo.filter(group_id=rid).first():
|
||||
await group.update_or_create(group_id=rid, defaults={"group_flag": 1})
|
||||
if group := await GroupInfo.get_or_none(group_id=rid):
|
||||
group.group_flag = 1
|
||||
await group.save(update_fields=["group_flag"])
|
||||
else:
|
||||
group_info = await bot.get_group_info(group_id=rid)
|
||||
await GroupInfo.create(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user