mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 12:51:35 +00:00
🐛 修复验证插件错误清理任务的问题
This commit is contained in:
parent
c83770d11f
commit
c44952fd3d
@ -124,7 +124,7 @@ class GroupJoiningVerification:
|
|||||||
if result == "pass":
|
if result == "pass":
|
||||||
await callback_query.answer(text="放行", show_alert=False)
|
await callback_query.answer(text="放行", show_alert=False)
|
||||||
await self.restore_member(context, chat.id, user_id)
|
await self.restore_member(context, chat.id, user_id)
|
||||||
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user_id}|auth_clean_join_message"):
|
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user_id}|auth_kick"):
|
||||||
schedule.remove()
|
schedule.remove()
|
||||||
await message.edit_text(f"{user_info} 被 {user.mention_markdown_v2()} 放行",
|
await message.edit_text(f"{user_info} 被 {user.mention_markdown_v2()} 放行",
|
||||||
parse_mode=ParseMode.MARKDOWN_V2)
|
parse_mode=ParseMode.MARKDOWN_V2)
|
||||||
@ -138,7 +138,7 @@ class GroupJoiningVerification:
|
|||||||
elif result == "unban":
|
elif result == "unban":
|
||||||
await callback_query.answer(text="解除驱离", show_alert=False)
|
await callback_query.answer(text="解除驱离", show_alert=False)
|
||||||
await self.restore_member(context, chat.id, user_id)
|
await self.restore_member(context, chat.id, user_id)
|
||||||
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user_id}|auth_clean_join_message"):
|
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user_id}|auth_kick"):
|
||||||
schedule.remove()
|
schedule.remove()
|
||||||
await message.edit_text(f"{user_info} 被 {user.mention_markdown_v2()} 解除驱离",
|
await message.edit_text(f"{user_info} 被 {user.mention_markdown_v2()} 解除驱离",
|
||||||
parse_mode=ParseMode.MARKDOWN_V2)
|
parse_mode=ParseMode.MARKDOWN_V2)
|
||||||
@ -180,7 +180,7 @@ class GroupJoiningVerification:
|
|||||||
buttons = [[InlineKeyboardButton("驱离", callback_data=f"auth_admin|kick|{user.id}")]]
|
buttons = [[InlineKeyboardButton("驱离", callback_data=f"auth_admin|kick|{user.id}")]]
|
||||||
await callback_query.answer(text="验证成功", show_alert=False)
|
await callback_query.answer(text="验证成功", show_alert=False)
|
||||||
await self.restore_member(context, chat.id, user_id)
|
await self.restore_member(context, chat.id, user_id)
|
||||||
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user.id}|auth_clean_join_message"):
|
if schedule := context.job_queue.scheduler.get_job(f"{chat.id}|{user.id}|auth_kick"):
|
||||||
schedule.remove()
|
schedule.remove()
|
||||||
text = f"{user.mention_markdown_v2()} 验证成功,向着星辰与深渊!\n" \
|
text = f"{user.mention_markdown_v2()} 验证成功,向着星辰与深渊!\n" \
|
||||||
f"问题:{escape_markdown(question, version=2)} \n" \
|
f"问题:{escape_markdown(question, version=2)} \n" \
|
||||||
@ -289,4 +289,4 @@ class GroupJoiningVerification:
|
|||||||
name=f"{chat.id}|{user.id}|auth_clean_question_message",
|
name=f"{chat.id}|{user.id}|auth_clean_question_message",
|
||||||
chat_id=chat.id, user_id=user.id,
|
chat_id=chat.id, user_id=user.id,
|
||||||
job_kwargs={"replace_existing": True,
|
job_kwargs={"replace_existing": True,
|
||||||
"id": f"{chat.id}|{user.id}|auth_clean_join_message"})
|
"id": f"{chat.id}|{user.id}|auth_clean_question_message"})
|
||||||
|
Loading…
Reference in New Issue
Block a user