Merge pull request #243 from InsanusMokrassar/9.4.0

9.4.0
This commit is contained in:
InsanusMokrassar 2023-11-26 18:17:08 +06:00 committed by GitHub
commit b1b8d0eb75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,11 @@
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.kslog.common.setDefaultKSLog
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 +13,11 @@ import dev.inmo.tgbotapi.extensions.api.bot.getMe
suspend fun main(vararg args: String) {
val botToken = args.first()
setDefaultKSLog(
KSLog { level: LogLevel, tag: String?, message: Any, throwable: Throwable? ->
println(defaultMessageFormatter(level, tag, message, throwable))
}
)
val bot = telegramBot(botToken)
println(bot.getMe())

View File

@ -4,8 +4,8 @@ org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2g
kotlin_version=1.9.20
telegram_bot_api_version=9.3.0
micro_utils_version=0.20.12
serialization_version=1.6.0
ktor_version=2.3.5
kotlin_version=1.9.21
telegram_bot_api_version=9.4.1
micro_utils_version=0.20.15
serialization_version=1.6.1
ktor_version=2.3.6