From 3a7ef565656f5e62b97578891bb97a1558e7496f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 3 Apr 2021 14:22:01 +0600 Subject: [PATCH] now user captcha checking is in parallel --- src/main/kotlin/dev/inmo/plagubot/plugins/captcha/Plugin.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/inmo/plagubot/plugins/captcha/Plugin.kt b/src/main/kotlin/dev/inmo/plagubot/plugins/captcha/Plugin.kt index 02ccfb9..b8a28ae 100644 --- a/src/main/kotlin/dev/inmo/plagubot/plugins/captcha/Plugin.kt +++ b/src/main/kotlin/dev/inmo/plagubot/plugins/captcha/Plugin.kt @@ -103,7 +103,11 @@ class CaptchaBotPlugin : Plugin { ) } val settings = it.chat.settings() - settings.captchaProvider.apply { doAction(it.date, chat, newUsers) } + doInSubContext(stopOnCompletion = false) { + launch { + settings.captchaProvider.apply { doAction(it.date, chat, newUsers) } + } + } } if (adminsAPI != null) {