mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-09-15 04:59:41 +00:00
updates and fixes
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package dev.inmo.plaguposter.common
|
||||
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.FullChatIdentifierSerializer
|
||||
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ShortMessageInfo(
|
||||
val chatId: ChatId,
|
||||
@Serializable(FullChatIdentifierSerializer::class)
|
||||
val chatId: IdChatIdentifier,
|
||||
val messageId: MessageIdentifier
|
||||
)
|
||||
|
||||
|
20
common/src/jvmMain/kotlin/CommonPlugin.kt
Normal file
20
common/src/jvmMain/kotlin/CommonPlugin.kt
Normal file
@@ -0,0 +1,20 @@
|
||||
package dev.inmo.plaguposter.common
|
||||
|
||||
import dev.inmo.kslog.common.i
|
||||
import dev.inmo.kslog.common.iS
|
||||
import dev.inmo.kslog.common.logger
|
||||
import dev.inmo.plagubot.Plugin
|
||||
import dev.inmo.tgbotapi.extensions.api.chat.get.getChat
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import org.koin.core.Koin
|
||||
|
||||
object CommonPlugin : Plugin {
|
||||
private val Log = logger
|
||||
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
|
||||
val config = koin.get<ChatConfig>()
|
||||
|
||||
Log.iS { "Target chat info: ${getChat(config.targetChatId)}" }
|
||||
Log.iS { "Source chat info: ${getChat(config.sourceChatId)}" }
|
||||
Log.iS { "Cache chat info: ${getChat(config.cacheChatId)}" }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user