mirror of
https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin.git
synced 2025-10-17 12:40:05 +00:00
fixes in simple captcha provider
This commit is contained in:
@@ -146,7 +146,7 @@ data class SimpleCaptchaProvider(
|
||||
newUsers.mapNotNull {
|
||||
safelyWithoutExceptions {
|
||||
launch {
|
||||
doInSubContext {
|
||||
doInSubContext(stopOnCompletion = false) {
|
||||
val callbackData = uuid4().toString()
|
||||
val sentMessage = sendTextMessage(
|
||||
chat,
|
||||
@@ -179,11 +179,14 @@ data class SimpleCaptchaProvider(
|
||||
stop()
|
||||
}
|
||||
|
||||
delay((userBanDateTime - eventDateTime).millisecondsLong)
|
||||
launch {
|
||||
delay((userBanDateTime - eventDateTime).millisecondsLong)
|
||||
|
||||
job.cancel()
|
||||
if (kick) {
|
||||
safelyWithoutExceptions { kickChatMember(chat, it) }
|
||||
job.cancel()
|
||||
if (kick) {
|
||||
safelyWithoutExceptions { kickChatMember(chat, it) }
|
||||
}
|
||||
stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user