Update __init__.py

This commit is contained in:
HibiKier 2021-11-18 14:41:13 +08:00 committed by GitHub
parent ab69e5c477
commit 955a1f8a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,9 +72,6 @@ async def _(bot: Bot, event: GroupRequestEvent, state: dict):
if event.sub_type == "invite":
if str(event.user_id) in bot.config.superusers:
try:
await bot.set_group_add_request(
flag=event.flag, sub_type="invite", approve=True
)
if await GroupInfo.get_group_info(event.group_id):
await GroupInfo.set_group_flag(event.group_id, 1)
else:
@ -86,6 +83,9 @@ async def _(bot: Bot, event: GroupRequestEvent, state: dict):
group_info["member_count"],
1,
)
await bot.set_group_add_request(
flag=event.flag, sub_type="invite", approve=True
)
except ActionFailed:
pass
else: