TelegramBotAPI-examples/GetMeBot/src/main/kotlin/GetMeBot.kt

13 lines
326 B
Kotlin
Raw Normal View History

2021-01-18 17:32:47 +00:00
import dev.inmo.tgbotapi.bot.Ktor.telegramBot
2020-10-04 11:32:50 +00:00
import dev.inmo.tgbotapi.extensions.api.bot.getMe
2020-06-02 15:48:07 +00:00
/**
* This is one of the most easiest bot - it will just print information about itself
*/
suspend fun main(vararg args: String) {
val botToken = args.first()
val bot = telegramBot(botToken)
println(bot.getMe())
}