Skip to content

Commit

Permalink
bump commons
Browse files Browse the repository at this point in the history
  • Loading branch information
centralhardware committed Oct 11, 2024
1 parent b9a9c96 commit 973fff5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {

dependencies {
implementation("dev.inmo:tgbotapi:18.2.1")
implementation("com.github.centralhardware:telegram-bot-commons:e279820516")
implementation("com.github.centralhardware:telegram-bot-commons:9f6c59be9c")
implementation("com.github.seratch:kotliquery:1.9.0")
}

Expand Down
9 changes: 6 additions & 3 deletions src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import dev.inmo.kslog.common.KSLog
import dev.inmo.kslog.common.configure
import dev.inmo.kslog.common.info
import dev.inmo.kslog.common.warning
import dev.inmo.tgbotapi.HealthCheck
import dev.inmo.tgbotapi.KSLogExceptionsHandler
import dev.inmo.tgbotapi.botToken
import dev.inmo.tgbotapi.extensions.api.answers.answer
import dev.inmo.tgbotapi.extensions.api.answers.answerInlineQuery
import dev.inmo.tgbotapi.extensions.behaviour_builder.telegramBotWithBehaviourAndLongPolling
Expand Down Expand Up @@ -59,9 +60,11 @@ private fun getArticle(

suspend fun main() {
KSLog.configure("LetMeGoogleThatForYou")
telegramBotWithBehaviourAndLongPolling(System.getenv("BOT_TOKEN"),
telegramBotWithBehaviourAndLongPolling(
botToken,
CoroutineScope(Dispatchers.IO),
defaultExceptionsHandler = { KSLog.warning("", it) }) {
defaultExceptionsHandler = KSLogExceptionsHandler
) {
HealthCheck.addBot(this)
onAnyInlineQuery {
KSLog.info(it.query)
Expand Down

0 comments on commit 973fff5

Please sign in to comment.