PlaguBot/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt
2020-11-12 11:52:09 +06:00

18 lines
503 B
Kotlin

package dev.inmo.plagubot
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.types.BotCommand
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
import kotlinx.coroutines.CoroutineScope
import org.jetbrains.exposed.sql.Database
interface Plugin {
suspend fun getCommands(): List<BotCommand> = emptyList()
suspend operator fun invoke(
bot: TelegramBot,
database: Database,
updatesFilter: FlowsUpdatesFilter,
scope: CoroutineScope
)
}