mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2025-12-26 16:15:39 +00:00
Compare commits
13 Commits
9.3.0
...
3609ae6bc2
| Author | SHA1 | Date | |
|---|---|---|---|
| 3609ae6bc2 | |||
| 4f128f3421 | |||
| ada6cd61d7 | |||
|
|
051d647004 | ||
|
|
d21606860a | ||
|
|
93c0fcb5bd | ||
| b1b8d0eb75 | |||
| 2ac23f70ab | |||
| e155373655 | |||
| d842dab5b8 | |||
| 7186d5e624 | |||
|
|
8fefb17599 | ||
| bcf4ae5888 |
@@ -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())
|
||||
|
||||
@@ -33,6 +33,6 @@ kotlin {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'io.ktor:ktor-client-logging-jvm:2.3.0'
|
||||
implementation 'io.ktor:ktor-client-logging-jvm:2.3.7'
|
||||
}
|
||||
|
||||
|
||||
@@ -18,5 +18,5 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
implementation "dev.inmo:tgbotapi:$telegram_bot_api_version"
|
||||
implementation 'io.ktor:ktor-client-logging-jvm:2.3.3'
|
||||
implementation 'io.ktor:ktor-client-logging-jvm:2.3.7'
|
||||
}
|
||||
|
||||
@@ -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.22
|
||||
telegram_bot_api_version=9.4.1
|
||||
micro_utils_version=0.20.15
|
||||
serialization_version=1.6.2
|
||||
ktor_version=2.3.6
|
||||
|
||||
Reference in New Issue
Block a user