mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-11-22 07:33:46 +00:00
add docs
This commit is contained in:
parent
b367fd21c5
commit
799e76b487
@ -6,8 +6,22 @@ import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import org.jetbrains.exposed.sql.Database
|
import org.jetbrains.exposed.sql.Database
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this interface for your bot. It is possible to use [kotlinx.serialization.SerialName] annotations on your plugins
|
||||||
|
* to set up short name for your plugin. Besides, simple name of your class will be used as key for deserialization
|
||||||
|
* too.
|
||||||
|
*/
|
||||||
interface Plugin {
|
interface Plugin {
|
||||||
|
/**
|
||||||
|
* In case you want to publish some processed by your plugin commands, you can provide it via this method
|
||||||
|
*
|
||||||
|
* @see BotCommand
|
||||||
|
*/
|
||||||
suspend fun getCommands(): List<BotCommand> = emptyList()
|
suspend fun getCommands(): List<BotCommand> = emptyList()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method (usually) will be invoked just one time in the whole application.
|
||||||
|
*/
|
||||||
suspend operator fun invoke(
|
suspend operator fun invoke(
|
||||||
bot: TelegramBot,
|
bot: TelegramBot,
|
||||||
database: Database,
|
database: Database,
|
||||||
|
Loading…
Reference in New Issue
Block a user