update dependencies

This commit is contained in:
InsanusMokrassar 2022-12-11 12:02:36 +06:00
parent 1eb5f75c78
commit 2b7a21342b
3 changed files with 12 additions and 12 deletions

View File

@ -1,12 +1,12 @@
[versions] [versions]
kotlin = "1.7.10" kotlin = "1.7.22"
tgbotapi = "3.2.1" tgbotapi = "4.2.1"
microutils = "0.12.11" microutils = "0.16.1"
imageboard = "2.5.2" imageboard = "2.5.2"
krontab = "0.8.0" krontab = "0.8.4"
kslog = "0.5.1" kslog = "0.5.4"
exposed = "0.39.2" exposed = "0.41.1"
psql = "42.5.0" psql = "42.5.0"
clikt = "3.5.0" clikt = "3.5.0"

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -162,7 +162,7 @@ suspend fun main(args: Array<String>) {
val parser = EnableArgsParser(onlyQueryIsRequired = false) val parser = EnableArgsParser(onlyQueryIsRequired = false)
runCatchingSafely { runCatchingSafely {
parser.parse(args) parser.parse(args)
repo.set(it.chat.id, parser.resultSettings ?: return@runCatchingSafely) repo.set(ChatId(it.chat.id.chatId), parser.resultSettings ?: return@runCatchingSafely)
}.onFailure { e -> }.onFailure { e ->
e.printStackTrace() e.printStackTrace()
if (it.chat is PrivateChat) { if (it.chat is PrivateChat) {
@ -179,14 +179,14 @@ suspend fun main(args: Array<String>) {
val args = it.content.textSources.drop(1).joinToString("") { it.source }.trim().takeIf { it.isNotBlank() } ?.split(" ") val args = it.content.textSources.drop(1).joinToString("") { it.source }.trim().takeIf { it.isNotBlank() } ?.split(" ")
val chatSettings = if (args.isNullOrEmpty()) { val chatSettings = if (args.isNullOrEmpty()) {
repo.get(it.chat.id) ?: run { repo.get(ChatId(it.chat.id.chatId)) ?: run {
if (it.chat is PrivateChat) { if (it.chat is PrivateChat) {
reply(it, "Unable to find default config") reply(it, "Unable to find default config")
} }
return@onCommand return@onCommand
} }
} else { } else {
val parser = EnableArgsParser(onlyQueryIsRequired = true, repo.get(it.chat.id) ?: ChatSettings.DEFAULT) val parser = EnableArgsParser(onlyQueryIsRequired = true, repo.get(ChatId(it.chat.id.chatId)) ?: ChatSettings.DEFAULT)
runCatchingSafely { runCatchingSafely {
parser.parse(args) parser.parse(args)
parser.resultSettings parser.resultSettings
@ -198,11 +198,11 @@ suspend fun main(args: Array<String>) {
}.getOrNull() }.getOrNull()
} }
triggerSendForChat(it.chat.id, chatSettings ?: return@onCommand) triggerSendForChat(ChatId(it.chat.id.chatId), chatSettings ?: return@onCommand)
} }
onCommand("disable", requireOnlyCommandInMessage = true) { onCommand("disable", requireOnlyCommandInMessage = true) {
runCatchingSafely { runCatchingSafely {
repo.unset(it.chat.id) repo.unset(ChatId(it.chat.id.chatId))
} }
runCatchingSafely { runCatchingSafely {
delete(it) delete(it)