This commit is contained in:
InsanusMokrassar 2023-04-16 13:28:40 +06:00
parent edf6c9717b
commit 4a90e0f427
4 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,6 @@ FROM adoptopenjdk/openjdk11
USER 1000 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 / ADD ./build/distributions/booru_grabber_bot.tar /

View File

@ -17,7 +17,7 @@ app=booru_grabber_bot
version=0.0.1 version=0.0.1
server=hub.docker.com 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/ # 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 build -t $app:"$version" .
assert_success sudo docker tag $app:"$version" $server/$app:$version assert_success sudo docker tag $app:"$version" $server/$app:$version

View File

@ -89,7 +89,7 @@ suspend fun main(args: Array<String>) {
val images = settings.makeRequest(i).takeIf { it.isNotEmpty() } ?: break val images = settings.makeRequest(i).takeIf { it.isNotEmpty() } ?: break
result.addAll( result.addAll(
images.filterNot { images.filterNot {
chatsUrlsSeen.contains(chatId, it.url) chatsUrlsSeen.contains(chatId, it.url ?: return@filterNot true)
} }
) )
i++ i++

View File

@ -41,7 +41,7 @@ data class ChatSettings(
suspend fun makeRequest(page: Int): List<BoardImage> { suspend fun makeRequest(page: Int): List<BoardImage> {
return withContext(Dispatchers.IO) { return withContext(Dispatchers.IO) {
board.search(page, count, query, rating).blocking() board.search(page, count, query, rating).blocking() ?: emptyList()
} }
} }