mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 15:36:44 +00:00
🎨 设置群验证模块刷新问题列表在插件初始化执行
This commit is contained in:
parent
f749fcd478
commit
54599b3474
@ -39,6 +39,11 @@ class GroupJoiningVerification(Plugin):
|
||||
self.chat_administrators_cache: Dict[Union[str, int], Tuple[float, List[ChatMember]]] = {}
|
||||
self.is_refresh_quiz = False
|
||||
|
||||
async def __async_init__(self):
|
||||
logger.info("群验证模块正在刷新问题列表")
|
||||
await self.refresh_quiz()
|
||||
logger.success("群验证模块刷新问题列表成功")
|
||||
|
||||
async def refresh_quiz(self):
|
||||
async with self.lock:
|
||||
if not self.is_refresh_quiz:
|
||||
@ -225,7 +230,6 @@ class GroupJoiningVerification(Plugin):
|
||||
return
|
||||
else:
|
||||
return
|
||||
await self.refresh_quiz()
|
||||
for user in message.new_chat_members:
|
||||
if user.id == context.bot.id:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user