mirror of
https://github.com/InsanusMokrassar/BooruGrabberTelegramBot.git
synced 2024-12-21 21:57:12 +00:00
fixes
This commit is contained in:
parent
edf6c9717b
commit
4a90e0f427
@ -2,6 +2,6 @@ FROM adoptopenjdk/openjdk11
|
||||
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/booru_grabber_bot/bin/booru_grabber_bot", "/booru_grabber_bot/local.config.json"]
|
||||
ENTRYPOINT ["/booru_grabber_bot/bin/booru_grabber_bot", "/booru_grabber_bot/config.json"]
|
||||
|
||||
ADD ./build/distributions/booru_grabber_bot.tar /
|
||||
|
@ -17,7 +17,7 @@ app=booru_grabber_bot
|
||||
version=0.0.1
|
||||
server=hub.docker.com
|
||||
|
||||
assert_success ../gradlew build
|
||||
assert_success ./gradlew build
|
||||
# scp ./build/distributions/AutoPostTestTelegramBot-1.0.0.zip ./config.json developer@insanusmokrassar.dev:/tmp/
|
||||
assert_success sudo docker build -t $app:"$version" .
|
||||
assert_success sudo docker tag $app:"$version" $server/$app:$version
|
||||
|
@ -89,7 +89,7 @@ suspend fun main(args: Array<String>) {
|
||||
val images = settings.makeRequest(i).takeIf { it.isNotEmpty() } ?: break
|
||||
result.addAll(
|
||||
images.filterNot {
|
||||
chatsUrlsSeen.contains(chatId, it.url)
|
||||
chatsUrlsSeen.contains(chatId, it.url ?: return@filterNot true)
|
||||
}
|
||||
)
|
||||
i++
|
||||
|
@ -41,7 +41,7 @@ data class ChatSettings(
|
||||
|
||||
suspend fun makeRequest(page: Int): List<BoardImage> {
|
||||
return withContext(Dispatchers.IO) {
|
||||
board.search(page, count, query, rating).blocking()
|
||||
board.search(page, count, query, rating).blocking() ?: emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user