mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-09-07 17:19:19 +00:00
update dependencies and fix build
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
|
|
||||||
|
* Dependencies update
|
||||||
|
|
||||||
## 0.8.0
|
## 0.8.0
|
||||||
|
|
||||||
* Dependencies update
|
* Dependencies update
|
||||||
|
@@ -2,8 +2,8 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
|
mavenLocal()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -32,10 +32,10 @@ if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != n
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
maven { url "https://nexus.inmo.dev/repository/maven-releases/" }
|
maven { url "https://nexus.inmo.dev/repository/maven-releases/" }
|
||||||
|
mavenLocal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "2.0.21"
|
kotlin = "2.1.20"
|
||||||
kotlin-serialization = "1.7.3"
|
kotlin-serialization = "1.8.1"
|
||||||
|
|
||||||
plagubot = "10.1.0"
|
plagubot = "10.6.0"
|
||||||
tgbotapi = "20.0.0"
|
tgbotapi = "26.0.0"
|
||||||
microutils = "0.23.0"
|
microutils = "0.25.8"
|
||||||
kslog = "1.3.6"
|
kslog = "1.4.2"
|
||||||
krontab = "2.6.1"
|
krontab = "2.7.2"
|
||||||
plagubot-plugins = "0.24.0"
|
plagubot-plugins = "0.24.4"
|
||||||
|
|
||||||
nmcp="0.2.1"
|
nmcp="0.2.1"
|
||||||
|
|
||||||
dokka = "1.9.20"
|
dokka = "2.0.0"
|
||||||
|
|
||||||
psql = "42.6.0"
|
psql = "42.6.0"
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ import dev.inmo.tgbotapi.extensions.api.edit.edit
|
|||||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.regular
|
import dev.inmo.tgbotapi.types.message.textsources.regularTextSource
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.*
|
||||||
import org.koin.core.Koin
|
import org.koin.core.Koin
|
||||||
@@ -90,9 +90,9 @@ object Plugin : Plugin {
|
|||||||
postsRepo.deleteById(postId)
|
postsRepo.deleteById(postId)
|
||||||
|
|
||||||
if (postsRepo.contains(postId)) {
|
if (postsRepo.contains(postId)) {
|
||||||
edit(it, it.content.textSources + regular(UnsuccessfulSymbol))
|
edit(it, it.content.textSources + regularTextSource(UnsuccessfulSymbol))
|
||||||
} else {
|
} else {
|
||||||
edit(it, it.content.textSources + regular(SuccessfulSymbol))
|
edit(it, it.content.textSources + regularTextSource(SuccessfulSymbol))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -132,7 +132,7 @@ class ExposedPostsRepo(
|
|||||||
}.associateBy { it.id }
|
}.associateBy { it.id }
|
||||||
val existsIds = posts.keys.toList()
|
val existsIds = posts.keys.toList()
|
||||||
transaction(db = database) {
|
transaction(db = database) {
|
||||||
val deleted = deleteWhere(null, null) {
|
val deleted = deleteWhere {
|
||||||
selectByIds(it, existsIds)
|
selectByIds(it, existsIds)
|
||||||
}
|
}
|
||||||
with(contentRepo) {
|
with(contentRepo) {
|
||||||
|
@@ -3,6 +3,7 @@ package dev.inmo.plaguposter.ratings.source
|
|||||||
import com.benasher44.uuid.uuid4
|
import com.benasher44.uuid.uuid4
|
||||||
import dev.inmo.kslog.common.e
|
import dev.inmo.kslog.common.e
|
||||||
import dev.inmo.kslog.common.logger
|
import dev.inmo.kslog.common.logger
|
||||||
|
import dev.inmo.micro_utils.coroutines.runCatchingLogging
|
||||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||||
import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions
|
import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions
|
||||||
import dev.inmo.micro_utils.pagination.firstPageWithOneElementPagination
|
import dev.inmo.micro_utils.pagination.firstPageWithOneElementPagination
|
||||||
@@ -42,10 +43,11 @@ import dev.inmo.tgbotapi.extensions.utils.types.buttons.flatInlineKeyboard
|
|||||||
import dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard
|
import dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard
|
||||||
import dev.inmo.tgbotapi.types.ReplyParameters
|
import dev.inmo.tgbotapi.types.ReplyParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.bold
|
import dev.inmo.tgbotapi.types.message.textsources.boldTextSource
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.regular
|
import dev.inmo.tgbotapi.types.message.textsources.regularTextSource
|
||||||
import dev.inmo.tgbotapi.types.polls.InputPollOption
|
import dev.inmo.tgbotapi.types.polls.InputPollOption
|
||||||
import dev.inmo.tgbotapi.types.polls.PollOption
|
import dev.inmo.tgbotapi.types.polls.PollOption
|
||||||
|
import dev.inmo.tgbotapi.utils.bold
|
||||||
import dev.inmo.tgbotapi.utils.buildEntities
|
import dev.inmo.tgbotapi.utils.buildEntities
|
||||||
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@@ -198,17 +200,17 @@ object Plugin : Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attachPoll(postId)) {
|
if (attachPoll(postId)) {
|
||||||
runCatchingSafely {
|
runCatchingLogging {
|
||||||
edit(
|
edit(
|
||||||
it,
|
it,
|
||||||
it.content.textSources + regular(" $SuccessfulSymbol")
|
it.content.textSources + regularTextSource(" $SuccessfulSymbol")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
runCatchingSafely {
|
runCatchingLogging {
|
||||||
edit(
|
edit(
|
||||||
it,
|
it,
|
||||||
it.content.textSources + regular(" $UnsuccessfulSymbol")
|
it.content.textSources + regularTextSource(" $UnsuccessfulSymbol")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,17 +235,17 @@ object Plugin : Plugin {
|
|||||||
|
|
||||||
|
|
||||||
if (detachPoll(postId)) {
|
if (detachPoll(postId)) {
|
||||||
runCatchingSafely {
|
runCatchingLogging {
|
||||||
edit(
|
edit(
|
||||||
it,
|
it,
|
||||||
it.content.textSources + regular(" $SuccessfulSymbol")
|
it.content.textSources + regularTextSource(" $SuccessfulSymbol")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
runCatchingSafely {
|
runCatchingLogging {
|
||||||
edit(
|
edit(
|
||||||
it,
|
it,
|
||||||
it.content.textSources + regular(" $UnsuccessfulSymbol")
|
it.content.textSources + regularTextSource(" $UnsuccessfulSymbol")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ import dev.inmo.tgbotapi.extensions.utils.types.buttons.flatInlineKeyboard
|
|||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.ChatId
|
||||||
import dev.inmo.tgbotapi.types.MessageId
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.regular
|
import dev.inmo.tgbotapi.types.message.textsources.regularTextSource
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.*
|
||||||
@@ -90,7 +90,7 @@ object Plugin : Plugin {
|
|||||||
|
|
||||||
edit(
|
edit(
|
||||||
it,
|
it,
|
||||||
it.content.textSources + regular(SuccessfulSymbol)
|
it.content.textSources + regularTextSource(SuccessfulSymbol)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user