This commit closes #13
This commit is contained in:
@@ -50,10 +50,11 @@ async def handler_user_join(app: PyroClient, message: Message):
|
||||
"User %s has previously failed the captcha, kicking and banning him",
|
||||
user.id,
|
||||
)
|
||||
banned = await app.ban_chat_member(group.id, user.id)
|
||||
if group.ban_failed:
|
||||
banned = await app.ban_chat_member(group.id, user.id)
|
||||
|
||||
if isinstance(banned, Message):
|
||||
await banned.delete()
|
||||
if isinstance(banned, Message):
|
||||
await banned.delete()
|
||||
|
||||
return
|
||||
|
||||
@@ -101,7 +102,7 @@ async def handler_user_join(app: PyroClient, message: Message):
|
||||
kick_unstarted,
|
||||
"date",
|
||||
[app, user.id, verification_request.chat.id, verification_request.id],
|
||||
run_date=datetime.now() + timedelta(seconds=app.config["timeouts"]["join"]),
|
||||
run_date=datetime.now() + timedelta(seconds=group.timeout_join),
|
||||
)
|
||||
await col_schedule.insert_one(
|
||||
{"user": user.id, "group": group.id, "job_id": job.id}
|
||||
|
Reference in New Issue
Block a user