mirror of
https://github.com/InsanusMokrassar/BooruGrabberTelegramBot.git
synced 2024-11-21 23:53:46 +00:00
update dependencies and make several small fixes
This commit is contained in:
parent
ea801e6e0d
commit
edf6c9717b
@ -1,14 +1,14 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "1.7.22"
|
kotlin = "1.8.20"
|
||||||
tgbotapi = "4.2.1"
|
tgbotapi = "7.0.1"
|
||||||
microutils = "0.16.1"
|
microutils = "0.17.6"
|
||||||
imageboard = "2.5.2"
|
imageboard = "2.6.0"
|
||||||
krontab = "0.8.4"
|
krontab = "0.10.0"
|
||||||
kslog = "0.5.4"
|
kslog = "1.1.1"
|
||||||
exposed = "0.41.1"
|
exposed = "0.41.1"
|
||||||
psql = "42.5.0"
|
psql = "42.6.0"
|
||||||
clikt = "3.5.0"
|
clikt = "3.5.2"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -94,8 +94,7 @@ suspend fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
val toDrop = (result.size - settings.count).takeIf { it > 0 } ?: return@let result
|
result.take(settings.count)
|
||||||
result.dropLast(toDrop)
|
|
||||||
}.takeIf { it.isNotEmpty() } ?: return
|
}.takeIf { it.isNotEmpty() } ?: return
|
||||||
runCatchingSafely {
|
runCatchingSafely {
|
||||||
val urls = result.map { it.url }
|
val urls = result.map { it.url }
|
||||||
@ -226,7 +225,18 @@ suspend fun main(args: Array<String>) {
|
|||||||
+"Count: " + code(settings.count.toString()) + "\n"
|
+"Count: " + code(settings.count.toString()) + "\n"
|
||||||
+"Gallery: " + code(settings.gallery.toString()) + "\n"
|
+"Gallery: " + code(settings.gallery.toString()) + "\n"
|
||||||
+"Rating: " + code(settings.rating ?.name ?: "unset") + "\n"
|
+"Rating: " + code(settings.rating ?.name ?: "unset") + "\n"
|
||||||
+"Attach urls: " + code(settings.attachUrls.toString())
|
+"Attach urls: " + code(settings.attachUrls.toString()) + "\n"
|
||||||
|
+"Command: " + code(
|
||||||
|
"/request " +
|
||||||
|
"${settings.query} " +
|
||||||
|
(settings.krontabTemplate ?.let { "-k $it " } ?: "") +
|
||||||
|
"-b ${DefaultBoards.values().first { it == settings.board.boardType }.name.lowercase()} " +
|
||||||
|
"-n ${settings.count} " +
|
||||||
|
(if (settings.gallery) "-g " else "") +
|
||||||
|
(settings.rating ?.let { "-r ${it.name} " } ?: "") +
|
||||||
|
(if (settings.attachUrls) "-a " else "")
|
||||||
|
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user