mirror of
https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin.git
synced 2025-01-05 23:40:03 +00:00
actualization
This commit is contained in:
parent
98f07d6611
commit
5e52e2c32e
@ -4,13 +4,13 @@ org.gradle.parallel=true
|
|||||||
kotlin.js.generate.externals=true
|
kotlin.js.generate.externals=true
|
||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
|
|
||||||
kotlin_version=1.4.32
|
kotlin_version=1.5.10
|
||||||
kotlin_coroutines_version=1.4.3
|
kotlin_coroutines_version=1.5.0
|
||||||
kotlin_serialisation_runtime_version=1.1.0
|
kotlin_serialisation_runtime_version=1.2.1
|
||||||
plagubot_version=0.2.1
|
plagubot_version=0.3.0
|
||||||
|
|
||||||
micro_utils_version=0.4.36
|
micro_utils_version=0.5.8
|
||||||
tgbotapi_libraries_version=0.0.8-branch_master-build25
|
tgbotapi_libraries_version=0.0.9-branch_master-build29
|
||||||
|
|
||||||
project_group=dev.inmo
|
project_group=dev.inmo
|
||||||
project_version=0.1.6
|
project_version=0.1.6
|
||||||
|
@ -2,6 +2,9 @@ package dev.inmo.plagubot.plugins.captcha
|
|||||||
|
|
||||||
import dev.inmo.micro_utils.coroutines.*
|
import dev.inmo.micro_utils.coroutines.*
|
||||||
import dev.inmo.micro_utils.repos.create
|
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.Plugin
|
||||||
import dev.inmo.plagubot.plugins.captcha.db.CaptchaChatsSettingsRepo
|
import dev.inmo.plagubot.plugins.captcha.db.CaptchaChatsSettingsRepo
|
||||||
import dev.inmo.plagubot.plugins.captcha.provider.*
|
import dev.inmo.plagubot.plugins.captcha.provider.*
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
package dev.inmo.plagubot.plugins.captcha.db
|
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.exposed.*
|
||||||
|
import dev.inmo.micro_utils.repos.versions.VersionsRepo
|
||||||
import dev.inmo.plagubot.plugins.captcha.provider.CaptchaProvider
|
import dev.inmo.plagubot.plugins.captcha.provider.CaptchaProvider
|
||||||
import dev.inmo.plagubot.plugins.captcha.provider.SimpleCaptchaProvider
|
import dev.inmo.plagubot.plugins.captcha.provider.SimpleCaptchaProvider
|
||||||
import dev.inmo.plagubot.plugins.captcha.settings.*
|
import dev.inmo.plagubot.plugins.captcha.settings.*
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.ChatId
|
||||||
import dev.inmo.tgbotapi.types.toChatId
|
import dev.inmo.tgbotapi.types.toChatId
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import org.jetbrains.exposed.sql.*
|
import org.jetbrains.exposed.sql.*
|
||||||
import org.jetbrains.exposed.sql.statements.InsertStatement
|
import org.jetbrains.exposed.sql.statements.InsertStatement
|
||||||
import org.jetbrains.exposed.sql.statements.UpdateStatement
|
import org.jetbrains.exposed.sql.statements.UpdateStatement
|
||||||
|
import org.jetbrains.exposed.sql.transactions.transaction
|
||||||
|
|
||||||
private val captchaProviderSerialFormat = Json {
|
private val captchaProviderSerialFormat = Json {
|
||||||
ignoreUnknownKeys = true
|
ignoreUnknownKeys = true
|
||||||
@ -33,8 +37,6 @@ class CaptchaChatsSettingsRepo(
|
|||||||
override val selectByIds: SqlExpressionBuilder.(List<ChatId>) -> Op<Boolean> = {
|
override val selectByIds: SqlExpressionBuilder.(List<ChatId>) -> Op<Boolean> = {
|
||||||
chatIdColumn.inList(it.map { it.chatId })
|
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>) {
|
override fun insert(value: ChatSettings, it: InsertStatement<Number>) {
|
||||||
it[chatIdColumn] = value.chatId.chatId
|
it[chatIdColumn] = value.chatId.chatId
|
||||||
|
Loading…
Reference in New Issue
Block a user