mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update __init__.py
This commit is contained in:
parent
ab69e5c477
commit
955a1f8a7f
@ -72,9 +72,6 @@ async def _(bot: Bot, event: GroupRequestEvent, state: dict):
|
|||||||
if event.sub_type == "invite":
|
if event.sub_type == "invite":
|
||||||
if str(event.user_id) in bot.config.superusers:
|
if str(event.user_id) in bot.config.superusers:
|
||||||
try:
|
try:
|
||||||
await bot.set_group_add_request(
|
|
||||||
flag=event.flag, sub_type="invite", approve=True
|
|
||||||
)
|
|
||||||
if await GroupInfo.get_group_info(event.group_id):
|
if await GroupInfo.get_group_info(event.group_id):
|
||||||
await GroupInfo.set_group_flag(event.group_id, 1)
|
await GroupInfo.set_group_flag(event.group_id, 1)
|
||||||
else:
|
else:
|
||||||
@ -86,6 +83,9 @@ async def _(bot: Bot, event: GroupRequestEvent, state: dict):
|
|||||||
group_info["member_count"],
|
group_info["member_count"],
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
|
await bot.set_group_add_request(
|
||||||
|
flag=event.flag, sub_type="invite", approve=True
|
||||||
|
)
|
||||||
except ActionFailed:
|
except ActionFailed:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user