mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2026-01-17 02:37:54 +00:00
start to fix some things
This commit is contained in:
13
src/main/kotlin/dev/inmo/plagubot/App.kt
Normal file
13
src/main/kotlin/dev/inmo/plagubot/App.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.plagubot
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.api.bot.getMe
|
||||
import dev.inmo.tgbotapi.extensions.api.telegramBot
|
||||
|
||||
/**
|
||||
* This method by default expects one argument in [args] field: telegram bot token
|
||||
*/
|
||||
suspend fun main(args: Array<String>) {
|
||||
val bot = telegramBot(args.first())
|
||||
|
||||
println(bot.getMe())
|
||||
}
|
||||
9
src/main/kotlin/dev/inmo/plagubot/Config.kt
Normal file
9
src/main/kotlin/dev/inmo/plagubot/Config.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package dev.inmo.plagubot
|
||||
|
||||
import kotlinx.serialization.Contextual
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Config(
|
||||
val plugins: List<@Contextual Plugin>
|
||||
)
|
||||
3
src/main/kotlin/dev/inmo/plagubot/Plugin.kt
Normal file
3
src/main/kotlin/dev/inmo/plagubot/Plugin.kt
Normal file
@@ -0,0 +1,3 @@
|
||||
package dev.inmo.plagubot
|
||||
|
||||
interface Plugin
|
||||
Reference in New Issue
Block a user