rework of plagubot system

This commit is contained in:
2024-09-22 15:29:17 +06:00
parent 893f3a95a1
commit d928db7e74
9 changed files with 161 additions and 145 deletions

View File

@@ -11,11 +11,8 @@ import kotlinx.serialization.Serializable
@Serializable
data class Config(
val botToken: String,
val plugins: List<StartPlugin>,
@SerialName("database")
val databaseConfig: DatabaseConfig = DatabaseConfig(),
val botApiServer: String = telegramBotAPIDefaultUrl,
val testServer: Boolean = false
) {
val botPlugins = plugins.filterIsInstance<Plugin>()
}
)

View File

@@ -1,7 +1,9 @@
package dev.inmo.plagubot.config
import dev.inmo.micro_utils.common.Warning
import kotlinx.serialization.json.Json
@Warning("This format will not be configured throw StartPlugin system. Use it will caution, it has no any configured things")
val defaultJsonFormat = Json {
ignoreUnknownKeys = true
}