mirror of
https://github.com/InsanusMokrassar/BooruGrabberTelegramBot.git
synced 2024-11-21 15:43:46 +00:00
update dependencies and make several small fixes
This commit is contained in:
parent
ea801e6e0d
commit
edf6c9717b
@ -1,14 +1,14 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "1.7.22"
|
||||
tgbotapi = "4.2.1"
|
||||
microutils = "0.16.1"
|
||||
imageboard = "2.5.2"
|
||||
krontab = "0.8.4"
|
||||
kslog = "0.5.4"
|
||||
kotlin = "1.8.20"
|
||||
tgbotapi = "7.0.1"
|
||||
microutils = "0.17.6"
|
||||
imageboard = "2.6.0"
|
||||
krontab = "0.10.0"
|
||||
kslog = "1.1.1"
|
||||
exposed = "0.41.1"
|
||||
psql = "42.5.0"
|
||||
clikt = "3.5.0"
|
||||
psql = "42.6.0"
|
||||
clikt = "3.5.2"
|
||||
|
||||
[libraries]
|
||||
|
||||
|
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.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -94,8 +94,7 @@ suspend fun main(args: Array<String>) {
|
||||
)
|
||||
i++
|
||||
}
|
||||
val toDrop = (result.size - settings.count).takeIf { it > 0 } ?: return@let result
|
||||
result.dropLast(toDrop)
|
||||
result.take(settings.count)
|
||||
}.takeIf { it.isNotEmpty() } ?: return
|
||||
runCatchingSafely {
|
||||
val urls = result.map { it.url }
|
||||
@ -226,7 +225,18 @@ suspend fun main(args: Array<String>) {
|
||||
+"Count: " + code(settings.count.toString()) + "\n"
|
||||
+"Gallery: " + code(settings.gallery.toString()) + "\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