com.github.insanusmokrassar.AutoPostTelegramBot.base.plugins.Plugin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AutoPostTelegramBot Show documentation
Show all versions of AutoPostTelegramBot Show documentation
It is base library for creating smart bot for simple management of channels posts
package com.github.insanusmokrassar.AutoPostTelegramBot.base.plugins
import com.github.insanusmokrassar.AutoPostTelegramBot.base.models.FinalConfig
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import java.util.logging.Level
import java.util.logging.Logger
typealias PluginName = String
val commonLogger = Logger.getLogger("common").also {
it.level = Level.FINER
}
interface Plugin {
val name: PluginName
get() = this::class.java.simpleName
suspend fun onInit(
executor: RequestsExecutor,
baseConfig: FinalConfig,
pluginManager: PluginManager
) { }
}