Desiders / telers

An asynchronous framework for Telegram Bot API written in Rust
https://docs.rs/telers
36 stars 3 forks source link

getUpdates processed with errors #17

Closed doryan04 closed 5 months ago

doryan04 commented 5 months ago

I have a telegram bot, a few times ago it worked fine, but at the random moment stop message processing, and nowadays I have errors looks like: image

Response:

{
  "ok": true,
  "result": [
    {
      "update_id": 33761968,
      "message": {
        "message_id": 240645,
        "from": {
          "id": 739639707,
          "is_bot": false,
          "first_name": "\u0420\u0435\u0434\u0443\u043c\u0435?",
          "username": "redddume",
          "is_premium": true
        },
        "chat": {
          "id": -1001356775536,
          "title": "Netschool Offtop",
          "username": "netschoolapi2",
          "type": "supergroup"
        },
        "date": 1716805239,
        "external_reply": {
          "origin": {
            "type": "channel",
            "chat": {
              "id": -1001043793945,
              "title": "\u041a\u043e\u0434 \u0414\u0443\u0440\u043e\u0432\u0430",
              "username": "d_code",
              "type": "channel"
            },
            "message_id": 19247,
            "date": 1716798198
          },
          "chat": {
            "id": -1001043793945,
            "title": "\u041a\u043e\u0434 \u0414\u0443\u0440\u043e\u0432\u0430",
            "username": "d_code",
            "type": "channel"
          },
          "message_id": 19247,
          "photo": [
            {
              "file_id": "AgACAgIAAx0CUN7AcAABA6wFZlRedxWklcRGCTJ4AAHmt-f5V82-AALh5DEbJ9uoSienBwABgN_ptwEAAwIAA3MAAzUE",
              "file_unique_id": "AQAD4eQxGyfbqEp4",
              "file_size": 1204,
              "width": 90,
              "height": 62
            },
            {
              "file_id": "AgACAgIAAx0CUN7AcAABA6wFZlRedxWklcRGCTJ4AAHmt-f5V82-AALh5DEbJ9uoSienBwABgN_ptwEAAwIAA20AAzUE",
              "file_unique_id": "AQAD4eQxGyfbqEpy",
              "file_size": 18290,
              "width": 320,
              "height": 219
            },
            {
              "file_id": "AgACAgIAAx0CUN7AcAABA6wFZlRedxWklcRGCTJ4AAHmt-f5V82-AALh5DEbJ9uoSienBwABgN_ptwEAAwIAA3gAAzUE",
              "file_unique_id": "AQAD4eQxGyfbqEp9",
              "file_size": 85039,
              "width": 800,
              "height": 547
            },
            {
              "file_id": "AgACAgIAAx0CUN7AcAABA6wFZlRedxWklcRGCTJ4AAHmt-f5V82-AALh5DEbJ9uoSienBwABgN_ptwEAAwIAA3kAAzUE",
              "file_unique_id": "AQAD4eQxGyfbqEp-",
              "file_size": 153204,
              "width": 1280,
              "height": 876
            }
          ]
        },
        "quote": {
          "text": "\u26a1\ufe0f Telegram \u043f\u0440\u043e\u0442\u0438\u0432 \u0444\u0435\u0439\u043a\u043e\u0432 //\u0412 \u0438\u0441\u0445\u043e\u0434\u043e\u043c \u043a\u043e\u0434\u0435 \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u0438 Telegram \u0434\u043b\u044f Android \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f Fact Check, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0444\u0430\u043a\u0442\u043e\u0432. \u2014 \u0412 \u043a\u043e\u0434\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e, \u0447\u0442\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Fact Check Telegram \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0430\u0442\u044c \u0441 \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.\u2014 Fact Check \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c. \u2014 \u041f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u0430\u043d \u0441\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Telegram. \u2014 \u0420\u0430\u0431\u043e\u0442\u0430 Fact Check \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u2014 \u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 Fact Check.@d_code",
          "entities": [
            {
              "offset": 0,
              "length": 2,
              "type": "custom_emoji",
              "custom_emoji_id": "5258203794772085854"
            },
            {
              "offset": 3,
              "length": 26,
              "type": "bold"
            }
          ],
          "position": 0
        },
        "text": "\u041c\u0443\u0442\u044c \u043a\u0430\u043a\u0430\u044f \u0442\u0430"
      }
    }
  ]
}

I'm using Telers ver. 1.0.0-alpha.18 with Tokio ver. 1.37.0

Desiders commented 5 months ago

Thanks for the PR!

The problem was the missing Option for is_manual (line). Fixed in commit f208f6f53a2fd90d435810a7de22f46ded266b61.

This version is not being released yet, so you need to use the GitHub version :(

Desiders commented 5 months ago

Write if you still have problems