mirror of
https://github.com/InsanusMokrassar/BooruGrabberTelegramBot.git
synced 2024-12-22 14:17:11 +00:00
update dependencies
This commit is contained in:
parent
1eb5f75c78
commit
2b7a21342b
@ -1,12 +1,12 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "1.7.10"
|
||||
tgbotapi = "3.2.1"
|
||||
microutils = "0.12.11"
|
||||
kotlin = "1.7.22"
|
||||
tgbotapi = "4.2.1"
|
||||
microutils = "0.16.1"
|
||||
imageboard = "2.5.2"
|
||||
krontab = "0.8.0"
|
||||
kslog = "0.5.1"
|
||||
exposed = "0.39.2"
|
||||
krontab = "0.8.4"
|
||||
kslog = "0.5.4"
|
||||
exposed = "0.41.1"
|
||||
psql = "42.5.0"
|
||||
clikt = "3.5.0"
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -162,7 +162,7 @@ suspend fun main(args: Array<String>) {
|
||||
val parser = EnableArgsParser(onlyQueryIsRequired = false)
|
||||
runCatchingSafely {
|
||||
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 ->
|
||||
e.printStackTrace()
|
||||
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 chatSettings = if (args.isNullOrEmpty()) {
|
||||
repo.get(it.chat.id) ?: run {
|
||||
repo.get(ChatId(it.chat.id.chatId)) ?: run {
|
||||
if (it.chat is PrivateChat) {
|
||||
reply(it, "Unable to find default config")
|
||||
}
|
||||
return@onCommand
|
||||
}
|
||||
} 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 {
|
||||
parser.parse(args)
|
||||
parser.resultSettings
|
||||
@ -198,11 +198,11 @@ suspend fun main(args: Array<String>) {
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
triggerSendForChat(it.chat.id, chatSettings ?: return@onCommand)
|
||||
triggerSendForChat(ChatId(it.chat.id.chatId), chatSettings ?: return@onCommand)
|
||||
}
|
||||
onCommand("disable", requireOnlyCommandInMessage = true) {
|
||||
runCatchingSafely {
|
||||
repo.unset(it.chat.id)
|
||||
repo.unset(ChatId(it.chat.id.chatId))
|
||||
}
|
||||
runCatchingSafely {
|
||||
delete(it)
|
||||
|
Loading…
Reference in New Issue
Block a user