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