actualization

This commit is contained in:
InsanusMokrassar 2021-06-13 01:35:47 +06:00
parent 98f07d6611
commit 5e52e2c32e
3 changed files with 13 additions and 8 deletions

View File

@ -4,13 +4,13 @@ org.gradle.parallel=true
kotlin.js.generate.externals=true
kotlin.incremental=true
kotlin_version=1.4.32
kotlin_coroutines_version=1.4.3
kotlin_serialisation_runtime_version=1.1.0
plagubot_version=0.2.1
kotlin_version=1.5.10
kotlin_coroutines_version=1.5.0
kotlin_serialisation_runtime_version=1.2.1
plagubot_version=0.3.0
micro_utils_version=0.4.36
tgbotapi_libraries_version=0.0.8-branch_master-build25
micro_utils_version=0.5.8
tgbotapi_libraries_version=0.0.9-branch_master-build29
project_group=dev.inmo
project_version=0.1.6

View File

@ -2,6 +2,9 @@ package dev.inmo.plagubot.plugins.captcha
import dev.inmo.micro_utils.coroutines.*
import dev.inmo.micro_utils.repos.create
import dev.inmo.micro_utils.repos.exposed.keyvalue.ExposedKeyValueRepo
import dev.inmo.micro_utils.repos.versions.KeyValueBasedVersionsRepoProxy
import dev.inmo.micro_utils.repos.versions.StandardVersionsRepo
import dev.inmo.plagubot.Plugin
import dev.inmo.plagubot.plugins.captcha.db.CaptchaChatsSettingsRepo
import dev.inmo.plagubot.plugins.captcha.provider.*

View File

@ -1,15 +1,19 @@
package dev.inmo.plagubot.plugins.captcha.db
import dev.inmo.micro_utils.coroutines.launchSynchronously
import dev.inmo.micro_utils.repos.exposed.*
import dev.inmo.micro_utils.repos.versions.VersionsRepo
import dev.inmo.plagubot.plugins.captcha.provider.CaptchaProvider
import dev.inmo.plagubot.plugins.captcha.provider.SimpleCaptchaProvider
import dev.inmo.plagubot.plugins.captcha.settings.*
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.toChatId
import kotlinx.coroutines.CoroutineScope
import kotlinx.serialization.json.Json
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.statements.InsertStatement
import org.jetbrains.exposed.sql.statements.UpdateStatement
import org.jetbrains.exposed.sql.transactions.transaction
private val captchaProviderSerialFormat = Json {
ignoreUnknownKeys = true
@ -33,8 +37,6 @@ class CaptchaChatsSettingsRepo(
override val selectByIds: SqlExpressionBuilder.(List<ChatId>) -> Op<Boolean> = {
chatIdColumn.inList(it.map { it.chatId })
}
override val InsertStatement<Number>.asObject: ChatSettings
get() = TODO("Not yet implemented")
override fun insert(value: ChatSettings, it: InsertStatement<Number>) {
it[chatIdColumn] = value.chatId.chatId