TelegramBotAPI-bot_template/src/main/kotlin/telegram_bot/App.kt

14 lines
324 B
Kotlin
Raw Normal View History

2020-11-08 12:54:22 +00:00
package telegram_bot
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())
}