PlaguBot/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt

18 lines
503 B
Kotlin
Raw Normal View History

2020-11-08 13:23:01 +00:00
package dev.inmo.plagubot
2020-11-11 17:05:21 +00:00
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
)
}