🎨 Update NEW_CHAT_MEMBERS message handler

This commit is contained in:
洛水居室 2023-09-26 18:50:48 +08:00
parent 203c7ac5df
commit 16c28db1cc
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -354,7 +354,6 @@ class GroupCaptcha(Plugin):
)
return
raise exc
new_chat_members_message = await self.get_new_chat_members_message(user, context)
question_id = random.choice(question_id_list) # nosec
question = await self.quiz_service.get_question(question_id)
buttons = [
@ -419,6 +418,7 @@ class GroupCaptcha(Plugin):
user_id=user.id,
job_kwargs={"replace_existing": True, "id": f"{chat.id}|{user.id}|auth_clean_question_message"},
)
new_chat_members_message = await self.get_new_chat_members_message(user, context)
try:
if new_chat_members_message:
await new_chat_members_message.delete()