mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2025-09-03 15:19:49 +00:00
update dependencies
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.kslog.common.LogLevel
|
||||
import dev.inmo.kslog.common.defaultMessageFormatter
|
||||
import dev.inmo.kslog.common.filter.filtered
|
||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.bot.getMe
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
|
||||
/**
|
||||
* This is one of the most easiest bot - it will just print information about itself
|
||||
@@ -7,6 +12,10 @@ import dev.inmo.tgbotapi.extensions.api.bot.getMe
|
||||
suspend fun main(vararg args: String) {
|
||||
val botToken = args.first()
|
||||
|
||||
KSLog.default = KSLog { level: LogLevel, tag: String?, message: Any, throwable: Throwable? ->
|
||||
println(defaultMessageFormatter(level, tag, message, throwable))
|
||||
}
|
||||
|
||||
val bot = telegramBot(botToken)
|
||||
|
||||
println(bot.getMe())
|
||||
|
Reference in New Issue
Block a user