Giter Site home page Giter Site logo

insanusmokrassar / ktgbotapi Goto Github PK

View Code? Open in Web Editor NEW
340.0 5.0 28.0 184.05 MB

Type-safe library for work with Telegram Bot API

Home Page: https://docs.inmo.dev/tgbotapi/index.html

License: Apache License 2.0

Kotlin 99.99% Shell 0.01%
telegram-bot-api kotlin kotlin-library kotlin-multiplatform kotlin-js kotlin-jvm telegrambotapi tgbotapi dev-inmo-tgbotapi telegram

ktgbotapi's Introduction

TelegramBotAPI Maven Central Supported version

Docs KDocs Mini tutorial
Useful repos Create bot Examples
Misc Awesome Kotlin Badge Small survey
Platforms JVM Js
Experimental Platforms Linux x64 MinGW x64

Hello! This is a set of libraries for working with Telegram Bot API.

Examples

There are several things you need to do to launch examples below:

  • Add mavenCentral() to your project repositories
  • Add dependency implementation "dev.inmo:tgbotapi:$tgbotapi_version"
    • Replace tgbotapi_version with exact version (see last one in the table above) or put variable with this name in project
    • Alternative variant for maven here

More including instructions available here. Other configuration examples:

Most common example

suspend fun main() {
  val bot = telegramBot(TOKEN)

  bot.buildBehaviourWithLongPolling {
    println(getMe())
  
    onCommand("start") {
      reply(it, "Hi:)")
    }
  }.join()
}

In this example you will see information about this bot at the moment of starting and answer with Hi:) every time it gets message /start

Handling only last messages

suspend fun main() {
  val bot = telegramBot(TOKEN)

  val flowsUpdatesFilter = FlowsUpdatesFilter()
  bot.buildBehaviour(flowUpdatesFilter = flowsUpdatesFilter) {
    println(getMe())
  
    onCommand("start") {
      reply(it, "Hi:)")
    }

    retrieveAccumulatedUpdates(this).join()
  }
}

The main difference with the previous example is that bot will get only last updates (accumulated before bot launch and maybe some updates it got after launch)

Build a little bit more complex behaviour

suspend fun main() {
  val bot = telegramBot(TOKEN)

  bot.buildBehaviourWithLongPolling {
    println(getMe())

    val nameReplyMarkup = ReplyKeyboardMarkup(
      matrix {
        row {
          +SimpleKeyboardButton("nope")
        }
      }
    )
    onCommand("start") {
      val photo = waitPhoto(
        SendTextMessage(it.chat.id, "Send me your photo please")
      ).first()

      val name = waitText(
        SendTextMessage(
          it.chat.id,
          "Send me your name or choose \"nope\"",
          replyMarkup = nameReplyMarkup
        )
      ).first().text.takeIf { it != "nope" }

      sendPhoto(
        it.chat,
        photo.mediaCollection,
        entities = buildEntities {
          if (name != null) regular(name) // may be collapsed up to name ?.let(::regular)
        }
      )
    }
  }.join()
}

More examples

You may find examples in this project. Besides, you are always welcome in our docs and chat.

ktgbotapi's People

Contributors

bpavuk avatar d1snin avatar djaler avatar insanusmokrassar avatar klimatov avatar leobia avatar madhead avatar mefilt avatar megamiun avatar renovate-bot avatar renovate[bot] avatar sleshjdev avatar sulg-ik avatar tolsi avatar vasya-polyansky avatar xzima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ktgbotapi's Issues

java.lang.IllegalArgumentException: Can't find correct serializer for inline button

java.lang.IllegalArgumentException: Can't find correct serializer for inline button serialized as {"text":"Играть в Math Battle","callback_game":{}}
at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButtonSerializer.resolveSerializer(InlineKeyboardButtonSerializer.kt:23)
at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButtonSerializer.deserialize(InlineKeyboardButtonSerializer.kt:30)
at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButtonSerializer.deserialize(InlineKeyboardButtonSerializer.kt:9)

Full update content:

{
   "update_id":84386544,
   "message":{
      "message_id":15118,
      "from":{
         "id":733446234,
         "is_bot":false,
         "first_name":"sᴇᴍ",
         "username":"Dilonlu"
      },
      "chat":{
         "id":-1001431988625,
         "title":"Friends 🤐😏😌😏",
         "type":"supergroup"
      },
      "date":1586624397,
      "game":{
         "title":"Math Battle",
         "description":"Show your math skills! How high can you score?",
         "photo":[
            {
               "file_id":"AgACAgEAAxUAAV6R943SYY9bcDEUK9zQbKhhjpMUAAI7tzEb43gEAAHNE0POhQGvF_3x5y8ABAEAAwIAA3MAA4__AAIYBA",
               "file_unique_id":"AQAD_fHnLwAEj_8AAg",
               "file_size":872,
               "width":90,
               "height":51
            },
            {
               "file_id":"AgACAgEAAxUAAV6R943SYY9bcDEUK9zQbKhhjpMUAAI7tzEb43gEAAHNE0POhQGvF_3x5y8ABAEAAwIAA20AA5D_AAIYBA",
               "file_unique_id":"AQAD_fHnLwAEkP8AAg",
               "file_size":9962,
               "width":320,
               "height":180
            },
            {
               "file_id":"AgACAgEAAxUAAV6R943SYY9bcDEUK9zQbKhhjpMUAAI7tzEb43gEAAHNE0POhQGvF_3x5y8ABAEAAwIAA3gAA47_AAIYBA",
               "file_unique_id":"AQAD_fHnLwAEjv8AAg",
               "file_size":19899,
               "width":640,
               "height":360
            }
         ]
      },
      "reply_markup":{
         "inline_keyboard":[
            [
               {
                  "text":"Играть в Math Battle",
                  "callback_game":{

                  }
               }
            ]
         ]
      }
   }
}

Listen for all IPs even without SSL config

I host my bot on heroku, which itself controls everything that is necessary for https. So I don't need and I simply can't provide SSL configuration. But, I should listen for 0.0.0.0, not localhost.

Require to implement Telegram Inline Mode API

Require to include Telegram Inline Mode API. Currently included:

  • InlineQuery
  • ChosenInlineResult
  • answerInlineQuery

InputMessageContent

  • InputTextMessageContent
  • InputLocationMessageContent
  • InputVenueMessageContent
  • InputContactMessageContent

InlineQueryResult

  • InlineQueryResultArticle
  • InlineQueryResultPhoto
  • InlineQueryResultCachedPhoto
  • InlineQueryResultGif
  • InlineQueryResultCachedGif
  • InlineQueryResultMpeg4Gif
  • InlineQueryResultCachedMpeg4Gif
  • InlineQueryResultVideo
  • InlineQueryResultCachedVideo
  • InlineQueryResultAudio
  • InlineQueryResultCachedAudio
  • InlineQueryResultVoice
  • InlineQueryResultCachedVoice
  • InlineQueryResultDocument
  • InlineQueryResultCachedDocument
  • InlineQueryResultLocation
  • InlineQueryResultVenue
  • InlineQueryResultContact
  • InlineQueryResultCachedSticker
  • InlineQueryResultGame

Rewrite ContentMessage

Currently ContentMessage have an generic type which in fact is redundant and useless. In fact will be more effective to use direct type in this interface and just override it in children

Add regen option

Add regen option which will constrain requests when it is too many per some time. Awaits realisation like:

@Serializable
data class Regen(
    @Optional
    val regenRate: Long = 1000L,
    @Optional
    val regenValue: Int = 1,
    @Optional
    val maxCount: Int = 10,
    @Optional
    val startCount: Int = 10
) {
    fun applyTo(...): Boolean { ... }
}

It must work like semaphore. Max count of currently available requests per some time defined by variable maxCount. Every regenRate milliseconds current available count of requests regenerate regenValue requests. Each requests trying to get one number from current available count. If current available count less or equal to 0 - it must await for available request, otherwise - it must send data.

Other variant is some launcher with channel. Each new request will increase time for awaiting of next request. Each completed (success or unsuccess) will decrease sending time await for next request. Something like:

val sender = launch {
    var awaitTime: Long = 200L
    for (message in channel) {
        awaitTime *= k
        launch {
            delay(awaitTime)
            // makeRequest
            awaitTime *= k
        }
    }
}

Here there are a few important moments:

  • k - the growth rate of awaitTime
  • There is problem of race condition in places where awaitTime is changing
  • Start, min, max await time and k must be configurable

Incompatible with ktor-client 1.3.0

Caused by: java.lang.IllegalStateException: Unbound [HttpClientCall] is deprecated. Consider using [request<HttpResponse>(block)] in instead.
	at io.ktor.client.call.HttpClientCallKt.call(HttpClientCall.kt:132)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.base.AbstractRequestCallFactory.prepareCall$suspendImpl(AbstractRequestCallFactory.kt:23)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.base.AbstractRequestCallFactory.prepareCall(AbstractRequestCallFactory.kt)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor$execute$2.invokeSuspend(KtorRequestsExecutor.kt:41)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor$execute$2.invoke(KtorRequestsExecutor.kt)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters.EmptyLimiter.limit(EmptyLimiter.kt:4)
	at com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor.execute(KtorRequestsExecutor.kt:38)

Manve central missed 0.28 version

Hi
image
Seems that 0.28 already published but it's not available in maven central. Is it accidentally or there is some policy about that?
Thanks

Require to implement Telegram Passport API

Require to include Telegram Passport API. Currently included:

  • PassportData
  • PassportFile
  • EncryptedPassportElement
  • EncryptedCredentials
  • setPassportDataErrors
  • PassportElementError
  • PassportElementErrorDataField
  • PassportElementErrorFrontSide
  • PassportElementErrorReverseSide
  • PassportElementErrorSelfie
  • PassportElementErrorFile
  • PassportElementErrorFiles
  • PassportElementErrorTranslationFile
  • PassportElementErrorTranslationFiles
  • PassportElementErrorUnspecified

Besides, it will be necessary to implement next things:

  • Tools for more simple decryption of incoming encrypted data
  • Tools for auto-decrypting Base64 encrypted data
  • Utils: Update ClassCasts for at least:
    • Message
    • EncryptedPassportElement
    • PassportElementError
    • SecureValue
  • Update behaviour_builder functionality:
    • Add wait tools
    • Add on tools
  • Api: Add setPassportDataErrorsshortcuts

Support for ip_address field for webhooks

  • Added the parameter ip_address to the method setWebhook, allowing to bypass DNS resolving and use the specified fixed IP address to send webhook requests.
  • Added the field ip_address to the class WebhookInfo, containing the current IP address used for webhook connections creation.

How to deserialize an Update in a web server request handler?

I'm writing a TG webhook handler in Ktor. I guess, that in order to deserialize an Update, I need to use UpdateSerializerWithoutSerialization / UpdateDeserializationStrategy or have direct access to RawUpdate (which is serializable).

But all those classes are internal and cannot be used in user code. So, how do we deserialize incoming updates?

Reformat CHANGELOG.md

Currently CHANGELOG.md have next format:

## MAJOR VERSION

Some notes

### LAST MINOR VERSION OF MAJOR VERSION

Some notes

### FIRST MINOR VERSION OF MAJOR VERSION

Some notes

As for this issues this format should be changed to the next one:

## LAST MINOR VERSION OF MAJOR VERSION

Some notes

## FIRST MINOR VERSION OF MAJOR VERSION

Some notes

## MAJOR VERSION

Some notes

Help to fill documentation

Currently, not the whole code is filled with KDocs. In case you wish to work on this issue, it could be useful to know:

  • Gradle command dokkaHtmlMultiModule will build kotlin documentation (in linux terminal: ./gradlew dokkaHtmlMultiModule, in windows probably: ./gradlew.bat dokkaHtmlMultiModule)
  • The most important to cover with kdocs is core
  • API Extensions subproject could be filled with kdocs like analogue of (here method from telegram bot api) with differences in (differences) (Telegram Bot API)[https://core.telegram.org/bots/api]

Add more intuitive casts-replacements

It could be very useful to create casts shortcuts like:

inline fun Chat.user(): User? = this as? User

Due to the fact that currently it is required to use casts like this everywhere in code and it make code dirty and less readable

Add reply extensions

It would be nice to add TelegramBot#replyTo(message: Message, …) extensions to make it easier to request sending messages with reply

Errors handling in updates listening

I got error #53 and, because this update can't be parsed, the whole updates listening stopped. Looks like there should be error handling. Both with webhooks and long polling

Error in requestExecutor.startGettingOfUpdates

Exception in thread "DefaultDispatcher-worker-1" kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[DefaultDispatcher, Continuation at com.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates.UpdatesPollingKt$startGettingOfUpdates$1.invokeSuspend(UpdatesPolling.kt:28)@1ab61e5a]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
  at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:93)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:64)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:561)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:727)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:667)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:655)
Caused by: java.lang.ClassCastException: kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to kotlinx.coroutines.DispatchedContinuation
  at kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:94)
  at kotlin.coroutines.jvm.internal.ContinuationImpl.releaseIntercepted(ContinuationImpl.kt:118)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:39)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
  ... 4 more

Update Dokka

Update Dokka dependency and its configurations

Add more usefull way to work with requests

It is currently required to add some additional API, which will allow to use requests methods like next:

val api = ...
println(api.getMe()) // instead of executor.execute(GetMe())

"from" field is missing in GroupEventMessage

When a bot is added to a group, a message like this is sent by the API:

{
	"update_id": 845170060,
	"message": {
		"message_id": 196,
		"from": {
			"id": 123, // A user, who added a bot to a group
			"is_bot": false,
			"first_name": "Name",
			"username": "username",
			"language_code": "en"
		},
		"chat": {
			"id": 42,
			"title": "Group",
			"type": "group",
			"all_members_are_administrators": true
		},
		"date": 1601159770,
		"new_chat_participant": {
			"id": 456, // Bot ID
			"is_bot": true,
			"first_name": "Bot",
			"username": "BotBot"
		},
		"new_chat_member": {
			"id": 456,
			"is_bot": true,
			"first_name": "Bot",
			"username": "BotBot"
		},
		"new_chat_members": [
			{
				"id": 456,
				"is_bot": true,
				"first_name": "Bot",
				"username": "BotBot"
			}
		]
	}
}

It is parsed as MessageUpdate:

MessageUpdate(
    updateId=845170060,
    data=GroupEventMessage(
        messageId=196,
        chat=GroupChatImpl(
            id=ChatId(chatId=42),
            title=Group
        ),
        chatEvent=NewChatMembers(
            members=[
                CommonBot(
                    id=ChatId(chatId=456),
                    username=Username(username=@BotBot),
                    firstName=Bot,
                    lastName=
                )
            ]
        ),
        date=Sat, 26 Sep 2020 22:36:10 UTC
    )
)

As you see, the information about the user is lost. Is it possible to retrieve it somehow?

Range errors

Currently there is no built-in way to handle throwRangeErrors without any try/catch

Fixes and refactoring

  • Rename ForwardedMessage to something like ForwardInfo
  • Rework returning types from sending requests; Examples:
    • ForwardMessage must return AbleToBeForwardedMessage message (at least)
    • SendPhoto must return ContentMesage<PhotoContent> or CommonMessage<PhotoContent>
  • Make internal serializers of library

Refactor user types

Refactor common and extended types of user and bot. Besides, replace ExtendedPrivateChatImpl due to the fact that it is extended version of CommonUser

An operation is not implemented in CallbackGame

2020-04-22T05:54:09.034066+00:00 app[web.1]: kotlin.NotImplementedError: An operation is not implemented.
2020-04-22T05:54:09.034067+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.games.CallbackGame.<init>(CallbackGame.kt:8)
2020-04-22T05:54:09.034068+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.games.CallbackGame$$serializer.deserialize(CallbackGame.kt)
2020-04-22T05:54:09.034068+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.games.CallbackGame$$serializer.deserialize(CallbackGame.kt:6)
2020-04-22T05:54:09.034069+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034069+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034070+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeSerializableElement$1.invoke(Tagged.kt:230)
2020-04-22T05:54:09.034070+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034071+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableElement(Tagged.kt:230)
2020-04-22T05:54:09.034072+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton$$serializer.deserialize(InlineKeyboardButton.kt)
2020-04-22T05:54:09.034073+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton$$serializer.deserialize(InlineKeyboardButton.kt:37)
2020-04-22T05:54:09.034073+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034074+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034074+00:00 app[web.1]: 	at kotlinx.serialization.DecodingKt.decode(Decoding.kt:521)
2020-04-22T05:54:09.034075+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.TreeJsonInputKt.readJson(TreeJsonInput.kt:21)
2020-04-22T05:54:09.034075+00:00 app[web.1]: 	at kotlinx.serialization.json.Json.fromJson(Json.kt:151)
2020-04-22T05:54:09.034076+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButtonSerializer.deserialize(InlineKeyboardButtonSerializer.kt:31)
2020-04-22T05:54:09.034076+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons.InlineKeyboardButtonSerializer.deserialize(InlineKeyboardButtonSerializer.kt:8)
2020-04-22T05:54:09.034077+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034077+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034078+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeSerializableElement$1.invoke(Tagged.kt:230)
2020-04-22T05:54:09.034078+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034079+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableElement(Tagged.kt:230)
2020-04-22T05:54:09.034079+00:00 app[web.1]: 	at kotlinx.serialization.internal.ListLikeSerializer.readElement(CollectionSerializers.kt:87)
2020-04-22T05:54:09.034080+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:54)
2020-04-22T05:54:09.034080+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.patch(CollectionSerializers.kt:36)
2020-04-22T05:54:09.034081+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:45)
2020-04-22T05:54:09.034081+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034082+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034082+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeSerializableElement$1.invoke(Tagged.kt:230)
2020-04-22T05:54:09.034083+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034083+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableElement(Tagged.kt:230)
2020-04-22T05:54:09.034084+00:00 app[web.1]: 	at kotlinx.serialization.internal.ListLikeSerializer.readElement(CollectionSerializers.kt:87)
2020-04-22T05:54:09.034084+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:54)
2020-04-22T05:54:09.034085+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.patch(CollectionSerializers.kt:36)
2020-04-22T05:54:09.034085+00:00 app[web.1]: 	at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:45)
2020-04-22T05:54:09.034086+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034094+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034095+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeSerializableElement$1.invoke(Tagged.kt:230)
2020-04-22T05:54:09.034095+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034095+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeSerializableElement(Tagged.kt:230)
2020-04-22T05:54:09.034096+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup$$serializer.deserialize(InlineKeyboardMarkup.kt)
2020-04-22T05:54:09.034097+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup$$serializer.deserialize(InlineKeyboardMarkup.kt:10)
2020-04-22T05:54:09.034097+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034098+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034101+00:00 app[web.1]: 	at kotlinx.serialization.Decoder$DefaultImpls.decodeNullableSerializableValue(Decoding.kt:231)
2020-04-22T05:54:09.034102+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeNullableSerializableValue(Tagged.kt:153)
2020-04-22T05:54:09.034102+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeNullableSerializableElement$1.invoke(Tagged.kt:233)
2020-04-22T05:54:09.034103+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034103+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeNullableSerializableElement(Tagged.kt:233)
2020-04-22T05:54:09.034104+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage$$serializer.deserialize(RawMessage.kt)
2020-04-22T05:54:09.034104+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage$$serializer.deserialize(RawMessage.kt:28)
2020-04-22T05:54:09.034105+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass.deserialize(Message.kt:29)
2020-04-22T05:54:09.034105+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass.deserialize(Message.kt:41)
2020-04-22T05:54:09.034106+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer.deserialize(Message.kt)
2020-04-22T05:54:09.034106+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer.deserialize(Message.kt:48)
2020-04-22T05:54:09.034107+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034107+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034108+00:00 app[web.1]: 	at kotlinx.serialization.Decoder$DefaultImpls.decodeNullableSerializableValue(Decoding.kt:231)
2020-04-22T05:54:09.034108+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeNullableSerializableValue(Tagged.kt:153)
2020-04-22T05:54:09.034109+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder$decodeNullableSerializableElement$1.invoke(Tagged.kt:233)
2020-04-22T05:54:09.034109+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.tagBlock(Tagged.kt:243)
2020-04-22T05:54:09.034110+00:00 app[web.1]: 	at kotlinx.serialization.internal.TaggedDecoder.decodeNullableSerializableElement(Tagged.kt:233)
2020-04-22T05:54:09.034110+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.update.RawUpdate$$serializer.deserialize(RawUpdate.kt)
2020-04-22T05:54:09.034111+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.types.update.RawUpdate$$serializer.deserialize(RawUpdate.kt:20)
2020-04-22T05:54:09.034112+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:52)
2020-04-22T05:54:09.034112+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.AbstractJsonTreeInput.decodeSerializableValue(TreeJsonInput.kt:44)
2020-04-22T05:54:09.034112+00:00 app[web.1]: 	at kotlinx.serialization.DecodingKt.decode(Decoding.kt:521)
2020-04-22T05:54:09.034113+00:00 app[web.1]: 	at kotlinx.serialization.json.internal.TreeJsonInputKt.readJson(TreeJsonInput.kt:21)
2020-04-22T05:54:09.034113+00:00 app[web.1]: 	at kotlinx.serialization.json.Json.fromJson(Json.kt:151)
2020-04-22T05:54:09.034114+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.WebhooksKt$setWebhook$env$1$1$1$1.invokeSuspend(Webhooks.kt:78)
2020-04-22T05:54:09.034114+00:00 app[web.1]: 	at com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.WebhooksKt$setWebhook$env$1$1$1$1.invoke(Webhooks.kt)
2020-04-22T05:54:09.034115+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
2020-04-22T05:54:09.034115+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
2020-04-22T05:54:09.034115+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
2020-04-22T05:54:09.034116+00:00 app[web.1]: 	at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
2020-04-22T05:54:09.034116+00:00 app[web.1]: 	at io.ktor.routing.Routing.executeResult(Routing.kt:147)
2020-04-22T05:54:09.034120+00:00 app[web.1]: 	at io.ktor.routing.Routing.interceptor(Routing.kt:34)
2020-04-22T05:54:09.034121+00:00 app[web.1]: 	at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:99)
2020-04-22T05:54:09.034121+00:00 app[web.1]: 	at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
2020-04-22T05:54:09.034121+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
2020-04-22T05:54:09.034122+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
2020-04-22T05:54:09.034123+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
2020-04-22T05:54:09.034123+00:00 app[web.1]: 	at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
2020-04-22T05:54:09.034124+00:00 app[web.1]: 	at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:120)
2020-04-22T05:54:09.034124+00:00 app[web.1]: 	at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
2020-04-22T05:54:09.034125+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
2020-04-22T05:54:09.034125+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
2020-04-22T05:54:09.034125+00:00 app[web.1]: 	at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
2020-04-22T05:54:09.034126+00:00 app[web.1]: 	at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
2020-04-22T05:54:09.034126+00:00 app[web.1]: 	at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invokeSuspend(NettyApplicationCallHandler.kt:40)
2020-04-22T05:54:09.034127+00:00 app[web.1]: 	at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
2020-04-22T05:54:09.034127+00:00 app[web.1]: 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
2020-04-22T05:54:09.034128+00:00 app[web.1]: 	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:111)
2020-04-22T05:54:09.034128+00:00 app[web.1]: 	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:158)
2020-04-22T05:54:09.034128+00:00 app[web.1]: 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:54)
2020-04-22T05:54:09.034129+00:00 app[web.1]: 	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
2020-04-22T05:54:09.034129+00:00 app[web.1]: 	at io.ktor.server.netty.NettyApplicationCallHandler.handleRequest(NettyApplicationCallHandler.kt:30)
2020-04-22T05:54:09.034130+00:00 app[web.1]: 	at io.ktor.server.netty.NettyApplicationCallHandler.channelRead(NettyApplicationCallHandler.kt:24)
2020-04-22T05:54:09.034130+00:00 app[web.1]: 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
2020-04-22T05:54:09.034130+00:00 app[web.1]: 	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:59)
2020-04-22T05:54:09.034131+00:00 app[web.1]: 	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:368)
2020-04-22T05:54:09.034131+00:00 app[web.1]: 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
2020-04-22T05:54:09.034131+00:00 app[web.1]: 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
2020-04-22T05:54:09.034132+00:00 app[web.1]: 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
2020-04-22T05:54:09.034132+00:00 app[web.1]: 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
2020-04-22T05:54:09.034132+00:00 app[web.1]: 	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
2020-04-22T05:54:09.034133+00:00 app[web.1]: 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
2020-04-22T05:54:09.034133+00:00 app[web.1]: 	at java.lang.Thread.run(Thread.java:748)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.