{
  "id": "task_libraries:telegram-bot/python",
  "path": "/exapedia/python-telegram-bot-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python telegram bot libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python Telegram bot libraries receive messages and commands from Telegram and send replies from Python code. An MTProto client connects to Telegram directly as a bot or a user account rather than through the HTTP Bot API. These libraries let developers run support bots, notification bots, and AI assistants inside Telegram chats."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python telegram bot libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#python-telegram-bot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F127"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telethon",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aiogram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pytelegrambotapi",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyrogram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telebot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telepot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-telegram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#python-telegram-bot",
          "label": [
            {
              "t": "text",
              "text": "python-telegram-bot"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F128"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Async request API",
            "Webhook registration"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#python-telegram-bot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F127"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telethon",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aiogram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pytelegrambotapi",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyrogram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telebot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#telepot",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-telegram",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "python-telegram-bot",
          "name": [
            {
              "t": "fact",
              "fact": "F127"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/python-telegram-bot/python-telegram-bot"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/python-telegram-bot"
            },
            {
              "label": "Docs",
              "href": "https://docs.python-telegram-bot.org/en/stable/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.python-telegram-bot.org/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F127"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F143"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def _send_msg(\n    self,\n    msg: str,\n    parse_mode: str = ParseMode.MARKDOWN,\n    disable_notification: bool = False,\n    keyboard: list[list[InlineKeyboardButton]] | None = None,\n    callback_path: str = \"\",\n    reload_able: bool = False,\n    query: CallbackQuery | None = None,\n) -> None:\n    \"\"\"\n    Send given markdown message\n    :param msg: message\n    :param bot: alternative bot\n    :param parse_mode: telegram parse mode\n    :return: None\n    \"\"\"\n    reply_markup: InlineKeyboardMarkup | ReplyKeyboardMarkup\n    if query:\n        await self._update_msg(\n            query=query,\n            msg=msg,\n            parse_mode=parse_mode,\n            callback_path=callback_path,\n            reload_able=reload_able,\n        )\n        return\n    if reload_able and self._config[\"telegram\"].get(\"reload\", True):\n        reply_markup = InlineKeyboardMarkup(\n            [[InlineKeyboardButton(\"Refresh\", callback_data=callback_path)]]\n        )\n    else:\n        if keyboard is not None:\n            reply_markup = InlineKeyboardMarkup(keyboard)\n        else:\n            reply_markup = ReplyKeyboardMarkup(self._keyboard, resize_keyboard=True)\n    try:\n        try:\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n        except NetworkError as network_err:\n            # Sometimes the telegram server resets the current connection,\n            # if this is the case we send the message again.\n            logger.warning(\n                \"Telegram NetworkError: %s! Trying one more time.\", network_err.message\n            )\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n    except TelegramError as telegram_err:\n        logger.warning(\"TelegramError: %s! Giving up on that message.\", telegram_err.message)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade/blob/7eb798c29314c46d76d4d87df2744c5669fcb515/freqtrade/rpc/telegram.py#L2201-L2262",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20python-telegram-bot%20for%20reliable%20message%20updates%2C%20scoped%20command%20menus%20and%20editable%20media%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F127"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nimport telegram\n\nasync def main():\n    bot = telegram.Bot(\"TOKEN\")\n    async with bot:\n        print(await bot.get_me())\n\nif __name__ == '__main__':\n    asyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API",
                  "label": [
                    {
                      "t": "text",
                      "text": "conversationbot.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F132"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "telethon",
          "name": [
            {
              "t": "fact",
              "fact": "F145"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/LonamiWebs/Telethon"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/Telethon"
            },
            {
              "label": "Docs",
              "href": "https://docs.telethon.dev/en/stable/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.telethon.dev/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/chigwell/telegram-mcp",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@mcp.tool(\n    annotations=ToolAnnotations(\n        title=\"Set Bot Commands\", openWorldHint=True, destructiveHint=True, idempotentHint=True\n    )\n)\n@with_account(readonly=False)\n@flood_category(\"admin_action\")\nasync def set_bot_commands(\n    bot_username: str, commands: list, account: Optional[str] = None\n) -> str:\n    \"\"\"\n    Set bot commands for a bot you own.\n    Note: This function can only be used if the Telegram client is a bot account.\n    Regular user accounts cannot set bot commands.\n\n    Args:\n        bot_username: The username of the bot to set commands for.\n        commands: List of command dictionaries with 'command' and 'description' keys.\n    \"\"\"\n    try:\n        cl = get_client(account)\n        # First check if the current client is a bot\n        me = await cl.get_me()\n        if not getattr(me, \"bot\", False):\n            return (\n                \"Error: This function can only be used by bot accounts. \"\n                \"Your current Telegram account is a regular user account, not a bot.\"\n            )\n\n        # Import required types\n        from telethon.tl.types import BotCommand, BotCommandScopeDefault\n        from telethon.tl.functions.bots import SetBotCommandsRequest\n\n        # Create BotCommand objects from the command dictionaries\n        bot_commands = [\n            BotCommand(command=c[\"command\"], description=c[\"description\"]) for c in commands\n        ]\n\n        # Get the bot entity\n        await resolve_entity(bot_username, cl)\n\n        # Set the commands with proper scope\n        await cl(\n            SetBotCommandsRequest(\n                scope=BotCommandScopeDefault(),\n                lang_code=\"en\",  # Default language code\n                commands=bot_commands,\n            )\n        )\n\n        return f\"Bot commands set for {bot_username}.\"\n    except ImportError as ie:\n        return log_and_format_error(\"set_bot_commands\", ie)\n    except Exception as e:\n        return log_and_format_error(\"set_bot_commands\", e, bot_username=bot_username)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/chigwell/telegram-mcp/blob/0d27284a5e99d788ffe4f857d9df8d9d668e2820/telegram_mcp/tools/profile.py#L452-L506",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20Telethon%20for%20reliable%20message%20updates%2C%20scoped%20command%20menus%20and%20editable%20media%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nfrom telethon.sync import TelegramClient\n\nwith TelegramClient(\"bot\", int(os.environ[\"TELEGRAM_API_ID\"]), os.environ[\"TELEGRAM_API_HASH\"]).start(\n    bot_token=os.environ[\"TELEGRAM_BOT_TOKEN\"]\n) as bot:\n    print(bot.get_me())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.telethon.dev/en/stable/basic/signing-in.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "print_messages.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F150"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "aiogram",
          "name": [
            {
              "t": "fact",
              "fact": "F163"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/aiogram/aiogram"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/aiogram"
            },
            {
              "label": "Docs",
              "href": "https://docs.aiogram.dev/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F59"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.aiogram.dev/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F163"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F60"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F61"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Tishka17/aiogram_dialog",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def edit_text(\n        self, bot: Bot, new_message: NewMessage, old_message: OldMessage,\n) -> Message:\n    logger.debug(\"edit_text to %s\", new_message.chat)\n    return await bot.edit_message_text(\n        message_id=old_message.message_id,\n        chat_id=old_message.chat.id,\n        business_connection_id=new_message.business_connection_id,\n        text=new_message.text,\n        reply_markup=new_message.reply_markup,\n        parse_mode=new_message.parse_mode,\n        link_preview_options=new_message.link_preview_options,\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Tishka17/aiogram_dialog/blob/0831da4a90d543bcb7c64636f7a3d01e8f2588d8/src/aiogram_dialog/manager/message_manager.py#L352-L364",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F178"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20aiogram%20for%20reliable%20message%20updates%2C%20scoped%20command%20menus%20and%20editable%20media%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F163"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nimport os\nfrom aiogram import Bot\n\nasync def main():\n    bot = Bot(token=os.environ[\"TELEGRAM_BOT_TOKEN\"])\n    async with bot.context():\n        print(await bot.get_me())\n\nasyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.aiogram.dev/en/latest/api/bot.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "finite_state_machine.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F168"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pytelegrambotapi",
          "name": [
            {
              "t": "fact",
              "fact": "F181"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/eternnoir/pyTelegramBotAPI"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pyTelegramBotAPI"
            },
            {
              "label": "Docs",
              "href": "https://pytba.readthedocs.io/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F85"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pytba.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F86"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F87"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/SideCloudGroup/BetterForward",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _set_bot_commands(self):\n    \"\"\"Set bot commands for different scopes.\"\"\"\n    self.bot.set_my_commands([\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"help\", _(\"Show help\")),\n    ], scope=types.BotCommandScopeAllPrivateChats())\n\n    self.bot.set_my_commands([\n        types.BotCommand(\"help\", _(\"Show help\")),\n        types.BotCommand(\"ban\", _(\"Ban a user\")),\n        types.BotCommand(\"unban\", _(\"Unban a user\")),\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"terminate\", _(\"Terminate a thread\")),\n        types.BotCommand(\"verify\", _(\"Set verified status\")),\n        types.BotCommand(\"setnote\", _(\"Set or clear topic note\")),\n        types.BotCommand(\"getnote\", _(\"Show topic note\")),\n        types.BotCommand(\"refresh\", _(\"Refresh user info\")),\n        types.BotCommand(\"allow\", _(\"Allow user permissions\")),\n        types.BotCommand(\"disallow\", _(\"Disallow user permissions\")),\n        types.BotCommand(\"permissions\", _(\"Show user permissions\")),\n        types.BotCommand(\"resetpermissions\", _(\"Reset user permission overrides\")),\n        types.BotCommand(\"stats\", _(\"Show statistics\")),\n        types.BotCommand(\"info\", _(\"Show user info\")),\n        types.BotCommand(\"r\", _(\"Send a reply template\")),\n    ], scope=types.BotCommandScopeChat(self.group_id))\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/SideCloudGroup/BetterForward/blob/bcfd8619821d98e27b6a5b0421ea18562f43a337/src/bot.py#L175-L199",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20pyTelegramBotAPI%20for%20reliable%20message%20updates%2C%20scoped%20command%20menus%20and%20editable%20media%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nfrom telebot import TeleBot\n\nbot = TeleBot(os.environ[\"TELEGRAM_BOT_TOKEN\"])\nprint(bot.get_me())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pytba.readthedocs.io/en/latest/sync_version/index.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "custom_states.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F186"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pyrogram",
          "name": [
            {
              "t": "fact",
              "fact": "F199"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pyrogram/pyrogram"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/Pyrogram"
            },
            {
              "label": "Docs",
              "href": "https://docs.pyrogram.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F206"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pyrogram.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F199"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nimport os\nfrom pyrogram import Client\n\nasync def main():\n    async with Client(\"bot\", int(os.environ[\"TELEGRAM_API_ID\"]), os.environ[\"TELEGRAM_API_HASH\"],\n                      bot_token=os.environ[\"TELEGRAM_BOT_TOKEN\"]) as app:\n        print(await app.get_me())\n\nasyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.pyrogram.org/api/client",
                  "label": [
                    {
                      "t": "text",
                      "text": "client.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Pyrogram%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F199"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "telebot",
          "name": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/KyleJamesWalker/telebot"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/telebot"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F221"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/KyleJamesWalker/telebot",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F214"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nfrom telebot_router import TeleBot\n\napp = TeleBot(__name__)\napp.config[\"api_key\"] = os.environ[\"TELEGRAM_BOT_TOKEN\"]\nprint(app.get_me())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/KyleJamesWalker/telebot/blob/master/README.rst",
                  "label": [
                    {
                      "t": "text",
                      "text": "__init__.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=telebot%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F214"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F219"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "telepot",
          "name": [
            {
              "t": "fact",
              "fact": "F229"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/nickoala/telepot"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/telepot"
            },
            {
              "label": "Docs",
              "href": "https://telepot.readthedocs.io/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://telepot.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F229"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import telepot\nbot = telepot.Bot('***** PUT YOUR TOKEN HERE *****')\nbot.getMe()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://telepot.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.rst"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=telepot%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F229"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "python-telegram",
          "name": [
            {
              "t": "fact",
              "fact": "F245"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/alexander-akhmetov/python-telegram"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/python-telegram"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/alexander-akhmetov/python-telegram",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F245"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import argparse\n\nfrom telegram.client import Telegram\n\n\ndef bot_get_me(api_id, api_hash, token):\n    tg = Telegram(\n        api_id=api_id,\n        api_hash=api_hash,\n        bot_token=token,\n        database_encryption_key=\"changeme1234\",\n    )\n    # you must call login method before others\n    tg.login()\n\n    result = tg.get_me()\n    result.wait()\n    print(result.update)\n    tg.stop()\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser()\n    parser.add_argument(\"api_id\", help=\"API id\")  # https://my.telegram.org/apps\n    parser.add_argument(\"api_hash\", help=\"API hash\")\n    parser.add_argument(\"token\", help=\"Bot token\")\n    args = parser.parse_args()\n    bot_get_me(args.api_id, args.api_hash, args.token)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/alexander-akhmetov/python-telegram/blob/main/examples/bot_login.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "bot_login.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=python-telegram%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F245"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F250"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python Telegram bot library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#python-telegram-bot",
          "label": [
            {
              "t": "text",
              "text": "python-telegram-bot"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits async bots with multi-step conversations, polling, and webhooks. "
        },
        {
          "t": "link",
          "href": "#aiogram",
          "label": [
            {
              "t": "text",
              "text": "aiogram"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits async bots organized with routers and finite-state workflows. "
        },
        {
          "t": "link",
          "href": "#telethon",
          "label": [
            {
              "t": "text",
              "text": "Telethon"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits user accounts or bots that need Telegram's full MTProto API."
        }
      ]
    },
    {
      "q": "What is Telethon?",
      "a": [
        {
          "t": "link",
          "href": "#telethon",
          "label": [
            {
              "t": "text",
              "text": "Telethon"
            }
          ]
        },
        {
          "t": "text",
          "text": " is an asyncio MTProto client for Telegram user and bot accounts. It needs an application API ID and hash even for a bot account."
        }
      ]
    },
    {
      "q": "What is Pyrogram?",
      "a": [
        {
          "t": "link",
          "href": "#pyrogram",
          "label": [
            {
              "t": "text",
              "text": "Pyrogram"
            }
          ]
        },
        {
          "t": "text",
          "text": " is an asynchronous Telegram MTProto API framework for users and bots."
        }
      ]
    },
    {
      "q": "What is aiogram?",
      "a": [
        {
          "t": "link",
          "href": "#aiogram",
          "label": [
            {
              "t": "text",
              "text": "aiogram"
            }
          ]
        },
        {
          "t": "text",
          "text": " is an asynchronous framework for the Telegram Bot API, with routers and finite-state workflows. Only one polling process can use a given bot token."
        }
      ]
    },
    {
      "q": "What is pyTelegramBotAPI?",
      "a": [
        {
          "t": "link",
          "href": "#pytelegrambotapi",
          "label": [
            {
              "t": "text",
              "text": "pyTelegramBotAPI"
            }
          ]
        },
        {
          "t": "text",
          "text": " offers synchronous and asynchronous interfaces to the Telegram Bot API, with an integrated webhook receiver."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, python-telegram-bot",
      "display": "python-telegram-bot",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, python-telegram-bot",
      "display": "7.8M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, python-telegram-bot",
      "display": "LGPL-3.0-only",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, python-telegram-bot",
      "display": "22.8, Jun 2026",
      "asOf": "2026-06-12"
    },
    "F5": {
      "label": "Package release date, python-telegram-bot",
      "display": "Jun 2026",
      "asOf": "2026-06-12"
    },
    "F6": {
      "label": "Repository stars, python-telegram-bot",
      "display": "29.6K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Native async API, python-telegram-bot",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Webhook delivery, python-telegram-bot",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Conversation state, python-telegram-bot",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Inline keyboards, python-telegram-bot",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, python-telegram-bot",
      "display": "pip install python-telegram-bot",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, python-telegram-bot",
      "display": "Provides an asynchronous Python interface to the Telegram Bot API.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, python-telegram-bot",
      "display": "Organizes multi-step conversations",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, python-telegram-bot",
      "display": "Use ConversationHandler to organize handlers for a conversation.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, python-telegram-bot",
      "display": "Supports polling and webhooks",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, python-telegram-bot",
      "display": "Receive updates through polling or an optional webhook server.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, python-telegram-bot",
      "display": "Conversations need sequential updates",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, python-telegram-bot",
      "display": "Disable concurrent_updates when using ConversationHandler.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, python-telegram-bot",
      "display": "Webhook hosting needs an extra",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, python-telegram-bot",
      "display": "Install the webhooks extra for the supplied webhook server.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, python-telegram-bot",
      "display": "#!/usr/bin/env python\n# pylint: disable=unused-argument\n# This program is dedicated to the public domain under the CC0 license.\n\n\"\"\"\nFirst, a few callback functions are defined. Then, those functions are passed to\nthe Application and registered at their respective places.\nThen, the bot is started and runs until we press Ctrl-C on the command line.\n\nUsage:\nExample of a bot-user conversation using ConversationHandler.\nSend /start to initiate the conversation.\nPress Ctrl-C on the command line or send a signal to the process to stop the\nbot.\n\"\"\"\n\nimport logging\n\nfrom telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, Update\nfrom telegram.ext import (\n    Application,\n    CommandHandler,\n    ContextTypes,\n    ConversationHandler,\n    MessageHandler,\n    filters,\n)\n\n# Enable logging\nlogging.basicConfig(\n    format=\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\", level=logging.INFO\n)\n# set higher logging level for httpx to avoid all GET and POST requests being logged\nlogging.getLogger(\"httpx\").setLevel(logging.WARNING)\n\nlogger = logging.getLogger(__name__)\n\nGENDER, PHOTO, LOCATION, BIO = range(4)\n\n\nasync def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Starts the conversation and asks the user about their gender.\"\"\"\n    reply_keyboard = [[\"Boy\", \"Girl\", \"Other\"]]\n\n    await update.message.reply_text(\n        \"Hi! My name is Professor Bot. I will hold a conversation with you. \"\n        \"Send /cancel to stop talking to me.\\n\\n\"\n        \"Are you a boy or a girl?\",\n        reply_markup=ReplyKeyboardMarkup(\n            reply_keyboard, one_time_keyboard=True, input_field_placeholder=\"Boy or Girl?\"\n        ),\n    )\n\n    return GENDER\n\n\nasync def gender(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Stores the selected gender and asks for a photo.\"\"\"\n    user = update.message.from_user\n    logger.info(\"Gender of %s: %s\", user.first_name, update.message.text)\n    await update.message.reply_text(\n        \"I see! Please send me a photo of yourself, \"\n        \"so I know what you look like, or send /skip if you don't want to.\",\n        reply_markup=ReplyKeyboardRemove(),\n    )\n\n    return PHOTO\n\n\nasync def photo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Stores the photo and asks for a location.\"\"\"\n    user = update.message.from_user\n    photo_file = await update.message.photo[-1].get_file()\n    await photo_file.download_to_drive(\"user_photo.jpg\")\n    logger.info(\"Photo of %s: %s\", user.first_name, \"user_photo.jpg\")\n    await update.message.reply_text(\n        \"Gorgeous! Now, send me your location please, or send /skip if you don't want to.\"\n    )\n\n    return LOCATION\n\n\nasync def skip_photo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Skips the photo and asks for a location.\"\"\"\n    user = update.message.from_user\n    logger.info(\"User %s did not send a photo.\", user.first_name)\n    await update.message.reply_text(\n        \"I bet you look great! Now, send me your location please, or send /skip.\"\n    )\n\n    return LOCATION\n\n\nasync def location(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Stores the location and asks for some info about the user.\"\"\"\n    user = update.message.from_user\n    user_location = update.message.location\n    logger.info(\n        \"Location of %s: %f / %f\", user.first_name, user_location.latitude, user_location.longitude\n    )\n    await update.message.reply_text(\n        \"Maybe I can visit you sometime! At last, tell me something about yourself.\"\n    )\n\n    return BIO\n\n\nasync def skip_location(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Skips the location and asks for info about the user.\"\"\"\n    user = update.message.from_user\n    logger.info(\"User %s did not send a location.\", user.first_name)\n    await update.message.reply_text(\n        \"You seem a bit paranoid! At last, tell me something about yourself.\"\n    )\n\n    return BIO\n\n\nasync def bio(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Stores the info about the user and ends the conversation.\"\"\"\n    user = update.message.from_user\n    logger.info(\"Bio of %s: %s\", user.first_name, update.message.text)\n    await update.message.reply_text(\"Thank you! I hope we can talk again some day.\")\n\n    return ConversationHandler.END\n\n\nasync def cancel(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:\n    \"\"\"Cancels and ends the conversation.\"\"\"\n    user = update.message.from_user\n    logger.info(\"User %s canceled the conversation.\", user.first_name)\n    await update.message.reply_text(\n        \"Bye! I hope we can talk again some day.\", reply_markup=ReplyKeyboardRemove()\n    )\n\n    return ConversationHandler.END\n\n\ndef main() -> None:\n    \"\"\"Run the bot.\"\"\"\n    # Create the Application and pass it your bot's token.\n    application = Application.builder().token(\"TOKEN\").build()\n\n    # Add conversation handler with the states GENDER, PHOTO, LOCATION and BIO\n    conv_handler = ConversationHandler(\n        entry_points=[CommandHandler(\"start\", start)],\n        states={\n            # Use case-insensitive regex to accept gender input regardless of letter casing,\n            # e.g., \"boy\", \"BOY\", \"Girl\", etc., will all be matched\n            GENDER: [MessageHandler(filters.Regex(\"(?i)^(Boy|Girl|Other)$\"), gender)],\n            PHOTO: [MessageHandler(filters.PHOTO, photo), CommandHandler(\"skip\", skip_photo)],\n            LOCATION: [\n                MessageHandler(filters.LOCATION, location),\n                CommandHandler(\"skip\", skip_location),\n            ],\n            BIO: [MessageHandler(filters.TEXT & ~filters.COMMAND, bio)],\n        },\n        fallbacks=[CommandHandler(\"cancel\", cancel)],\n    )\n\n    application.add_handler(conv_handler)\n\n    # Run the bot until the user presses Ctrl-C\n    application.run_polling(allowed_updates=Update.ALL_TYPES)\n\n\nif __name__ == \"__main__\":\n    main()\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, python-telegram-bot",
      "display": "async def _send_msg(\n    self,\n    msg: str,\n    parse_mode: str = ParseMode.MARKDOWN,\n    disable_notification: bool = False,\n    keyboard: list[list[InlineKeyboardButton]] | None = None,\n    callback_path: str = \"\",\n    reload_able: bool = False,\n    query: CallbackQuery | None = None,\n) -> None:\n    \"\"\"\n    Send given markdown message\n    :param msg: message\n    :param bot: alternative bot\n    :param parse_mode: telegram parse mode\n    :return: None\n    \"\"\"\n    reply_markup: InlineKeyboardMarkup | ReplyKeyboardMarkup\n    if query:\n        await self._update_msg(\n            query=query,\n            msg=msg,\n            parse_mode=parse_mode,\n            callback_path=callback_path,\n            reload_able=reload_able,\n        )\n        return\n    if reload_able and self._config[\"telegram\"].get(\"reload\", True):\n        reply_markup = InlineKeyboardMarkup(\n            [[InlineKeyboardButton(\"Refresh\", callback_data=callback_path)]]\n        )\n    else:\n        if keyboard is not None:\n            reply_markup = InlineKeyboardMarkup(keyboard)\n        else:\n            reply_markup = ReplyKeyboardMarkup(self._keyboard, resize_keyboard=True)\n    try:\n        try:\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n        except NetworkError as network_err:\n            # Sometimes the telegram server resets the current connection,\n            # if this is the case we send the message again.\n            logger.warning(\n                \"Telegram NetworkError: %s! Trying one more time.\", network_err.message\n            )\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n    except TelegramError as telegram_err:\n        logger.warning(\"TelegramError: %s! Giving up on that message.\", telegram_err.message)\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, python-telegram-bot",
      "display": "telegram.py · _send_msg()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, python-telegram-bot",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, freqtrade/freqtrade",
      "display": "56.9K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, freqtrade/freqtrade",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F27": {
      "label": "Library name, Telethon",
      "display": "Telethon",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, Telethon",
      "display": "4.0M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, Telethon",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, Telethon",
      "display": "1.45.0, Sep 2026",
      "asOf": "2026-09-10"
    },
    "F31": {
      "label": "Package release date, Telethon",
      "display": "Sep 2026",
      "asOf": "2026-09-10"
    },
    "F32": {
      "label": "Repository stars, Telethon",
      "display": "12.1K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Native async API, Telethon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Webhook delivery, Telethon",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Conversation state, Telethon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Inline keyboards, Telethon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, Telethon",
      "display": "pip install Telethon",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, Telethon",
      "display": "Provides an asyncio MTProto client for Telegram user or bot accounts.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, Telethon",
      "display": "Connects through the full API",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, Telethon",
      "display": "Use MTProto with a user account or a bot account.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, Telethon",
      "display": "Tracks a per-chat conversation",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, Telethon",
      "display": "Wait for replies within a conversation scoped to one chat.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, Telethon",
      "display": "Needs application API credentials",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, Telethon",
      "display": "Provide an API ID and hash, including for bot accounts.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, Telethon",
      "display": "Development moved to Codeberg",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, Telethon",
      "display": "The former GitHub repository can disappear.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, Telethon",
      "display": "#!/usr/bin/env python3\n# A simple script to print some messages.\nimport os\nimport sys\nimport time\n\nfrom telethon import TelegramClient, events, utils\n\n\ndef get_env(name, message, cast=str):\n    if name in os.environ:\n        return os.environ[name]\n    while True:\n        value = input(message)\n        try:\n            return cast(value)\n        except ValueError as e:\n            print(e, file=sys.stderr)\n            time.sleep(1)\n\n\nsession = os.environ.get('TG_SESSION', 'printer')\napi_id = get_env('TG_API_ID', 'Enter your API ID: ', int)\napi_hash = get_env('TG_API_HASH', 'Enter your API hash: ')\nproxy = None  # https://github.com/romis2012/python-socks\n\n# Create and start the client so we can make requests (we don't here)\nclient = TelegramClient(session, api_id, api_hash, proxy=proxy).start()\n\n\n# `pattern` is a regex, see https://docs.python.org/3/library/re.html\n# Use https://regexone.com/ if you want a more interactive way of learning.\n#\n# \"(?i)\" makes it case-insensitive, and | separates \"options\".\n@client.on(events.NewMessage(pattern=r'(?i).*\\b(hello|hi)\\b'))\nasync def handler(event):\n    sender = await event.get_sender()\n    name = utils.get_display_name(sender)\n    print(name, 'said', event.text, '!')\n\ntry:\n    print('(Press Ctrl+C to stop this)')\n    client.run_until_disconnected()\nfinally:\n    client.disconnect()\n\n# Note: We used try/finally to show it can be done this way, but using:\n#\n#   with client:\n#       client.run_until_disconnected()\n#\n# is almost always a better idea.\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Library name, aiogram",
      "display": "aiogram",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Monthly downloads, aiogram",
      "display": "3.2M",
      "asOf": "2026-11-16"
    },
    "F50": {
      "label": "License, aiogram",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Package release, aiogram",
      "display": "3.32.0, Nov 2026",
      "asOf": "2026-11-15"
    },
    "F52": {
      "label": "Package release date, aiogram",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F53": {
      "label": "Repository stars, aiogram",
      "display": "5.9K",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Native async API, aiogram",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Webhook delivery, aiogram",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Conversation state, aiogram",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Inline keyboards, aiogram",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Install, aiogram",
      "display": "pip install aiogram",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "What it does, aiogram",
      "display": "Provides an asynchronous framework for the Telegram Bot API.",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "strengths lead, aiogram",
      "display": "Provides finite-state bot workflows",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "strengths, aiogram",
      "display": "Organize multi-step interactions with the finite-state machine.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, aiogram",
      "display": "Separates handlers through routers",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, aiogram",
      "display": "Group update handlers into reusable routers.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "limitations lead, aiogram",
      "display": "Memory storage loses restart state",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "limitations, aiogram",
      "display": "Use persistent storage when conversations must survive restarts.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, aiogram",
      "display": "Polling needs one process",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, aiogram",
      "display": "Use webhooks to scale one bot across processes.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "Quickstart, aiogram",
      "display": "import asyncio\nimport logging\nimport sys\nfrom os import getenv\nfrom typing import Any\n\nfrom aiogram import Bot, Dispatcher, F, Router, html\nfrom aiogram.client.default import DefaultBotProperties\nfrom aiogram.enums import ParseMode\nfrom aiogram.filters import Command, CommandStart\nfrom aiogram.fsm.context import FSMContext\nfrom aiogram.fsm.state import State, StatesGroup\nfrom aiogram.types import (\n    KeyboardButton,\n    Message,\n    ReplyKeyboardMarkup,\n    ReplyKeyboardRemove,\n)\n\nTOKEN = getenv(\"BOT_TOKEN\")\n\nform_router = Router()\n\n\nclass Form(StatesGroup):\n    name = State()\n    like_bots = State()\n    language = State()\n\n\n@form_router.message(CommandStart())\nasync def command_start(message: Message, state: FSMContext) -> None:\n    await state.set_state(Form.name)\n    await message.answer(\n        \"Hi there! What's your name?\",\n        reply_markup=ReplyKeyboardRemove(),\n    )\n\n\n@form_router.message(Command(\"cancel\"))\n@form_router.message(F.text.casefold() == \"cancel\")\nasync def cancel_handler(message: Message, state: FSMContext) -> None:\n    \"\"\"\n    Allow user to cancel any action\n    \"\"\"\n    current_state = await state.get_state()\n    if current_state is None:\n        return\n\n    logging.info(\"Cancelling state %r\", current_state)\n    await state.clear()\n    await message.answer(\n        \"Cancelled.\",\n        reply_markup=ReplyKeyboardRemove(),\n    )\n\n\n@form_router.message(Form.name)\nasync def process_name(message: Message, state: FSMContext) -> None:\n    await state.update_data(name=message.text)\n    await state.set_state(Form.like_bots)\n    await message.answer(\n        f\"Nice to meet you, {html.quote(message.text)}!\\nDid you like to write bots?\",\n        reply_markup=ReplyKeyboardMarkup(\n            keyboard=[\n                [\n                    KeyboardButton(text=\"Yes\"),\n                    KeyboardButton(text=\"No\"),\n                ],\n            ],\n            resize_keyboard=True,\n        ),\n    )\n\n\n@form_router.message(Form.like_bots, F.text.casefold() == \"no\")\nasync def process_dont_like_write_bots(message: Message, state: FSMContext) -> None:\n    data = await state.get_data()\n    await state.clear()\n    await message.answer(\n        \"Not bad not terrible.\\nSee you soon.\",\n        reply_markup=ReplyKeyboardRemove(),\n    )\n    await show_summary(message=message, data=data, positive=False)\n\n\n@form_router.message(Form.like_bots, F.text.casefold() == \"yes\")\nasync def process_like_write_bots(message: Message, state: FSMContext) -> None:\n    await state.set_state(Form.language)\n\n    await message.reply(\n        \"Cool! I'm too!\\nWhat programming language did you use for it?\",\n        reply_markup=ReplyKeyboardRemove(),\n    )\n\n\n@form_router.message(Form.like_bots)\nasync def process_unknown_write_bots(message: Message) -> None:\n    await message.reply(\"I don't understand you :(\")\n\n\n@form_router.message(Form.language)\nasync def process_language(message: Message, state: FSMContext) -> None:\n    data = await state.update_data(language=message.text)\n    await state.clear()\n\n    if message.text.casefold() == \"python\":\n        await message.reply(\n            \"Python, you say? That's the language that makes my circuits light up! 😉\",\n        )\n\n    await show_summary(message=message, data=data)\n\n\nasync def show_summary(message: Message, data: dict[str, Any], positive: bool = True) -> None:\n    name = data[\"name\"]\n    language = data.get(\"language\", \"<something unexpected>\")\n    text = f\"I'll keep in mind that, {html.quote(name)}, \"\n    text += (\n        f\"you like to write bots with {html.quote(language)}.\"\n        if positive\n        else \"you don't like to write bots, so sad...\"\n    )\n    await message.answer(text=text, reply_markup=ReplyKeyboardRemove())\n\n\nasync def main() -> None:\n    # Initialize Bot instance with default bot properties which will be passed to all API calls\n    bot = Bot(token=TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML))\n\n    dp = Dispatcher()\n\n    dp.include_router(form_router)\n\n    # Start event dispatching\n    await dp.start_polling(bot)\n\n\nif __name__ == \"__main__\":\n    logging.basicConfig(level=logging.INFO, stream=sys.stdout)\n    asyncio.run(main())\n",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Project function, aiogram",
      "display": "async def edit_media(\n        self, bot: Bot, new_message: NewMessage, old_message: OldMessage,\n) -> Message:\n    logger.debug(\n        \"edit_media to %s, media_id: %s\",\n        new_message.chat,\n        new_message.media.file_id,\n    )\n    media = INPUT_MEDIA_TYPES[new_message.media.type](\n        caption=new_message.text,\n        reply_markup=new_message.reply_markup,\n        parse_mode=new_message.parse_mode,\n        media=await self.get_media_source(new_message.media, bot),\n        **new_message.media.kwargs,\n    )\n    return await bot.edit_message_media(\n        message_id=old_message.message_id,\n        chat_id=old_message.chat.id,\n        media=media,\n        reply_markup=new_message.reply_markup,\n    )\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function reference, aiogram",
      "display": "message_manager.py · edit_media()",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project repository, aiogram",
      "display": "Tishka17/aiogram_dialog",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project stars, Tishka17/aiogram_dialog",
      "display": "899",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project push date, Tishka17/aiogram_dialog",
      "display": "Nov 2026",
      "asOf": "2026-11-12"
    },
    "F74": {
      "label": "Library name, pyTelegramBotAPI",
      "display": "pyTelegramBotAPI",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Monthly downloads, pyTelegramBotAPI",
      "display": "922.2K",
      "asOf": "2026-11-16"
    },
    "F76": {
      "label": "License, pyTelegramBotAPI",
      "display": "GPL2",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Package release, pyTelegramBotAPI",
      "display": "4.37.1, Oct 2026",
      "asOf": "2026-10-17"
    },
    "F78": {
      "label": "Package release date, pyTelegramBotAPI",
      "display": "Oct 2026",
      "asOf": "2026-10-17"
    },
    "F79": {
      "label": "Repository stars, pyTelegramBotAPI",
      "display": "8.8K",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Native async API, pyTelegramBotAPI",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Webhook delivery, pyTelegramBotAPI",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Conversation state, pyTelegramBotAPI",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Inline keyboards, pyTelegramBotAPI",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Install, pyTelegramBotAPI",
      "display": "pip install pyTelegramBotAPI",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "What it does, pyTelegramBotAPI",
      "display": "Provides synchronous and asynchronous interfaces to the Telegram Bot API.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths lead, pyTelegramBotAPI",
      "display": "Offers synchronous and asynchronous APIs",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths, pyTelegramBotAPI",
      "display": "Choose a synchronous or asynchronous bot implementation.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, pyTelegramBotAPI",
      "display": "Provides an integrated webhook receiver",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, pyTelegramBotAPI",
      "display": "Use run_webhooks to receive and process webhook updates.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations lead, pyTelegramBotAPI",
      "display": "State examples need durable storage",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations, pyTelegramBotAPI",
      "display": "Replace the sample’s in-memory state storage for production use.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Quickstart, pyTelegramBotAPI",
      "display": "import telebot\nfrom telebot import custom_filters, types\nfrom telebot.states import State, StatesGroup\nfrom telebot.states.sync.context import StateContext\nfrom telebot.storage import StateMemoryStorage\nfrom telebot.types import ReplyParameters\n\n# Initialize the bot\nstate_storage = StateMemoryStorage()  # don't use this in production; switch to redis\nbot = telebot.TeleBot(\"TOKEN\", state_storage=state_storage, use_class_middlewares=True)\n\n\n# Define states\nclass MyStates(StatesGroup):\n    name = State()\n    age = State()\n    color = State()\n    hobby = State()\n\n\n# Start command handler\n@bot.message_handler(commands=[\"start\"])\ndef start_ex(message: types.Message, state: StateContext):\n    state.set(MyStates.name)\n    bot.send_message(\n        message.chat.id,\n        \"Hello! What is your first name?\",\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n\n\n# Cancel command handler\n@bot.message_handler(state=\"*\", commands=[\"cancel\"])\ndef any_state(message: types.Message, state: StateContext):\n    state.delete()\n    bot.send_message(\n        message.chat.id,\n        \"Your information has been cleared. Type /start to begin again.\",\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n\n\n# Handler for name input\n@bot.message_handler(state=MyStates.name)\ndef name_get(message: types.Message, state: StateContext):\n    state.set(MyStates.age)\n    bot.send_message(\n        message.chat.id, \"How old are you?\",\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n    state.add_data(name=message.text)\n\n\n# Handler for age input\n@bot.message_handler(state=MyStates.age, is_digit=True)\ndef ask_color(message: types.Message, state: StateContext):\n    state.set(MyStates.color)\n    state.add_data(age=message.text)\n\n    # Define reply keyboard for color selection\n    keyboard = types.ReplyKeyboardMarkup(row_width=2)\n    colors = [\"Red\", \"Green\", \"Blue\", \"Yellow\", \"Purple\", \"Orange\", \"Other\"]\n    buttons = [types.KeyboardButton(color) for color in colors]\n    keyboard.add(*buttons)\n\n    bot.send_message(\n        message.chat.id,\n        \"What is your favorite color? Choose from the options below.\",\n        reply_markup=keyboard,\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n\n\n# Handler for color input\n@bot.message_handler(state=MyStates.color)\ndef ask_hobby(message: types.Message, state: StateContext):\n    state.set(MyStates.hobby)\n    state.add_data(color=message.text)\n\n    # Define reply keyboard for hobby selection\n    keyboard = types.ReplyKeyboardMarkup(row_width=2)\n    hobbies = [\"Reading\", \"Traveling\", \"Gaming\", \"Cooking\"]\n    buttons = [types.KeyboardButton(hobby) for hobby in hobbies]\n    keyboard.add(*buttons)\n\n    bot.send_message(\n        message.chat.id,\n        \"What is one of your hobbies? Choose from the options below.\",\n        reply_markup=keyboard,\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n\n\n# Handler for hobby input\n@bot.message_handler(\n    state=MyStates.hobby, text=[\"Reading\", \"Traveling\", \"Gaming\", \"Cooking\"]\n)\ndef finish(message: types.Message, state: StateContext):\n    with state.data() as data:\n        name = data.get(\"name\")\n        age = data.get(\"age\")\n        color = data.get(\"color\")\n        hobby = message.text  # Get the hobby from the message text\n\n        # Provide a fun fact based on color\n        color_facts = {\n            \"Red\": \"Red is often associated with excitement and passion.\",\n            \"Green\": \"Green is the color of nature and tranquility.\",\n            \"Blue\": \"Blue is known for its calming and serene effects.\",\n            \"Yellow\": \"Yellow is a cheerful color often associated with happiness.\",\n            \"Purple\": \"Purple signifies royalty and luxury.\",\n            \"Orange\": \"Orange is a vibrant color that stimulates enthusiasm.\",\n            \"Other\": \"Colors have various meanings depending on context.\",\n        }\n        color_fact = color_facts.get(\n            color, \"Colors have diverse meanings, and yours is unique!\"\n        )\n\n        msg = (\n            f\"Thank you for sharing! Here is a summary of your information:\\n\"\n            f\"First Name: {name}\\n\"\n            f\"Age: {age}\\n\"\n            f\"Favorite Color: {color}\\n\"\n            f\"Fun Fact about your color: {color_fact}\\n\"\n            f\"Favorite Hobby: {hobby}\"\n        )\n\n    bot.send_message(\n        message.chat.id, msg, parse_mode=\"html\",\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n    state.delete()\n\n\n# Handler for incorrect age input\n@bot.message_handler(state=MyStates.age, is_digit=False)\ndef age_incorrect(message: types.Message):\n    bot.send_message(\n        message.chat.id,\n        \"Please enter a valid number for age.\",\n        reply_parameters=ReplyParameters(message_id=message.message_id),\n    )\n\n\n# Add custom filters\nbot.add_custom_filter(custom_filters.StateFilter(bot))\nbot.add_custom_filter(custom_filters.IsDigitFilter())\nbot.add_custom_filter(custom_filters.TextMatchFilter())\n\n# necessary for state parameter in handlers.\nfrom telebot.states.sync.middleware import StateMiddleware\n\nbot.setup_middleware(StateMiddleware(bot))\n\n# Start polling\nbot.infinity_polling()\n",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project function, pyTelegramBotAPI",
      "display": "def _set_bot_commands(self):\n    \"\"\"Set bot commands for different scopes.\"\"\"\n    self.bot.set_my_commands([\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"help\", _(\"Show help\")),\n    ], scope=types.BotCommandScopeAllPrivateChats())\n\n    self.bot.set_my_commands([\n        types.BotCommand(\"help\", _(\"Show help\")),\n        types.BotCommand(\"ban\", _(\"Ban a user\")),\n        types.BotCommand(\"unban\", _(\"Unban a user\")),\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"terminate\", _(\"Terminate a thread\")),\n        types.BotCommand(\"verify\", _(\"Set verified status\")),\n        types.BotCommand(\"setnote\", _(\"Set or clear topic note\")),\n        types.BotCommand(\"getnote\", _(\"Show topic note\")),\n        types.BotCommand(\"refresh\", _(\"Refresh user info\")),\n        types.BotCommand(\"allow\", _(\"Allow user permissions\")),\n        types.BotCommand(\"disallow\", _(\"Disallow user permissions\")),\n        types.BotCommand(\"permissions\", _(\"Show user permissions\")),\n        types.BotCommand(\"resetpermissions\", _(\"Reset user permission overrides\")),\n        types.BotCommand(\"stats\", _(\"Show statistics\")),\n        types.BotCommand(\"info\", _(\"Show user info\")),\n        types.BotCommand(\"r\", _(\"Send a reply template\")),\n    ], scope=types.BotCommandScopeChat(self.group_id))\n",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Project function reference, pyTelegramBotAPI",
      "display": "bot.py · _set_bot_commands()",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project repository, pyTelegramBotAPI",
      "display": "SideCloudGroup/BetterForward",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project stars, SideCloudGroup/BetterForward",
      "display": "737",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project push date, SideCloudGroup/BetterForward",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F98": {
      "label": "Developer need",
      "display": "Multi-step asynchronous bots",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose python-telegram-bot",
      "display": "a dedicated conversation handler around asynchronous Bot API updates",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "multi-step asynchronous bots",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider aiogram",
      "display": "reusable update routers drive the application structure",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Synchronous bot applications",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose pyTelegramBotAPI",
      "display": "a choice of synchronous and asynchronous bot APIs",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "synchronous bot applications",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider python-telegram-bot",
      "display": "asynchronous conversation handlers fit the workflow",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Routed state-machine workflows",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose aiogram",
      "display": "an integrated finite-state machine for bot interactions",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "routed state-machine workflows",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "When to consider pyTelegramBotAPI",
      "display": "existing application code needs synchronous handlers",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need",
      "display": "User-account or direct protocol clients",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose Telethon",
      "display": "MTProto access with user or bot authentication",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "user-account or direct protocol clients",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Page introduction",
      "display": "Python telegram bot libraries let application developers work with Telegram messages and bots.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which Python Telegram library should I choose?",
      "display": "python-telegram-bot provides an asynchronous Bot API interface.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which Python Telegram library should I choose?",
      "display": "pyTelegramBotAPI offers synchronous and asynchronous implementations.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Which Python Telegram library should I choose?",
      "display": "aiogram includes a finite-state machine.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Which Python Telegram library should I choose?",
      "display": "Telethon uses MTProto with user or bot accounts.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does ConversationHandler work with concurrent updates?",
      "display": "Process updates sequentially and disable concurrent_updates when using ConversationHandler.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: What extra does python-telegram-bot need for webhook hosting?",
      "display": "Install the webhooks extra to use its supplied Tornado webhook server.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does pyTelegramBotAPI include a webhook receiver?",
      "display": "Its run_webhooks helper receives and processes webhook updates.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Will an aiogram memory store survive a restart?",
      "display": "MemoryStorage does not persist state across restarts; use persistent storage when continuity matters.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can aiogram polling run in multiple processes for one bot?",
      "display": "Only one polling process can use a given token; use webhooks for scaling.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does Telethon use the HTTP Bot API?",
      "display": "Telethon communicates directly using MTProto, including for bot accounts.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does Telethon use the HTTP Bot API?",
      "display": "Its direct connection does not use HTTP polling or webhooks.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does a Telethon bot need application credentials?",
      "display": "An application API ID and hash are required even when using a bot account.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Where is Telethon developed now?",
      "display": "The project moved to Codeberg; the former GitHub repository may be deleted.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "Library name, python-telegram-bot",
      "display": "python-telegram-bot",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Monthly downloads, python-telegram-bot",
      "display": "7.8M",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "License, python-telegram-bot",
      "display": "LGPL-3.0-only",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release, python-telegram-bot",
      "display": "22.8",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Package release date, python-telegram-bot",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Install, python-telegram-bot",
      "display": "pip install python-telegram-bot --upgrade",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Quickstart, python-telegram-bot",
      "display": "import asyncio\nimport telegram\n\nasync def main():\n    bot = telegram.Bot(\"TOKEN\")\n    async with bot:\n        print(await bot.get_me())\n\nif __name__ == '__main__':\n    asyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Repository stars, python-telegram-bot",
      "display": "29.6K",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Async request API, python-telegram-bot",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Webhook registration, python-telegram-bot",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Protocol and authentication, python-telegram-bot",
      "display": "HTTP Bot API with asyncio requests and Application handler framework; BotFather token sufficient for Bot API access.",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Current runtime and required setup, python-telegram-bot",
      "display": "{\"requires_python\": \">=3.10\", \"prerequisites\": [\"Replace TOKEN with an actual BotFather token before running. Current22.8 distribution requires Python>=3.10. async with releases the HTTP resources.\"]}",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Delivery and concurrency model, python-telegram-bot",
      "display": "{\"Async request API\": \"Native coroutine Bot API request; blocking polling entrypoints do not make the request method synchronous.\", \"Webhook registration\": \"Registers an HTTP Bot API webhook; hosting a TLS receiver is separate and can use optional webhooks dependencies.\"}",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Actual application argument and return contract, python-telegram-bot",
      "display": "{\"status\": \"verified\", \"arguments\": \"Original Freqtrade method uses native inline/reply keyboards, current send_message chat_id,text,parse_mode,reply_markup,disable_notification,and optional message_thread_id. Keyboard members must be valid current button objects; source keyboard types/imports and host Application are retained. Query branch delegates to the local update helper and exits; send retry executes only on NetworkError. Telegram chat must permit the bot to send and topic_id must be valid for that chat.\", \"return_shape\": \"send_message returns Message,ignored; keyboard constructors return the respective accepted reply_markup objects. The two send sites are initial attempt and one error retry,not an unconditional two-message send. Query branch does not perform these native sends. No trading application execution or credential files accessed.\"}",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project function, python-telegram-bot",
      "display": "async def _send_msg(\n    self,\n    msg: str,\n    parse_mode: str = ParseMode.MARKDOWN,\n    disable_notification: bool = False,\n    keyboard: list[list[InlineKeyboardButton]] | None = None,\n    callback_path: str = \"\",\n    reload_able: bool = False,\n    query: CallbackQuery | None = None,\n) -> None:\n    \"\"\"\n    Send given markdown message\n    :param msg: message\n    :param bot: alternative bot\n    :param parse_mode: telegram parse mode\n    :return: None\n    \"\"\"\n    reply_markup: InlineKeyboardMarkup | ReplyKeyboardMarkup\n    if query:\n        await self._update_msg(\n            query=query,\n            msg=msg,\n            parse_mode=parse_mode,\n            callback_path=callback_path,\n            reload_able=reload_able,\n        )\n        return\n    if reload_able and self._config[\"telegram\"].get(\"reload\", True):\n        reply_markup = InlineKeyboardMarkup(\n            [[InlineKeyboardButton(\"Refresh\", callback_data=callback_path)]]\n        )\n    else:\n        if keyboard is not None:\n            reply_markup = InlineKeyboardMarkup(keyboard)\n        else:\n            reply_markup = ReplyKeyboardMarkup(self._keyboard, resize_keyboard=True)\n    try:\n        try:\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n        except NetworkError as network_err:\n            # Sometimes the telegram server resets the current connection,\n            # if this is the case we send the message again.\n            logger.warning(\n                \"Telegram NetworkError: %s! Trying one more time.\", network_err.message\n            )\n            await self._app.bot.send_message(\n                self._config[\"telegram\"][\"chat_id\"],\n                text=msg,\n                parse_mode=parse_mode,\n                reply_markup=reply_markup,\n                disable_notification=disable_notification,\n                message_thread_id=self._config[\"telegram\"].get(\"topic_id\"),\n            )\n    except TelegramError as telegram_err:\n        logger.warning(\"TelegramError: %s! Giving up on that message.\", telegram_err.message)\n",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project source file, python-telegram-bot",
      "display": "freqtrade/rpc/telegram.py",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project full_name, python-telegram-bot",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project stargazers_count, python-telegram-bot",
      "display": "56.9K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Library name, Telethon",
      "display": "Telethon",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Monthly downloads, Telethon",
      "display": "4.1M",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "License, Telethon",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release, Telethon",
      "display": "1.45.0",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Package release date, Telethon",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Install, Telethon",
      "display": "python3 -m pip install --upgrade telethon",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Quickstart, Telethon",
      "display": "import os\nfrom telethon.sync import TelegramClient\n\nwith TelegramClient(\"bot\", int(os.environ[\"TELEGRAM_API_ID\"]), os.environ[\"TELEGRAM_API_HASH\"]).start(\n    bot_token=os.environ[\"TELEGRAM_BOT_TOKEN\"]\n) as bot:\n    print(bot.get_me())\n",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Repository stars, Telethon",
      "display": "12.1K",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Async request API, Telethon",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Webhook registration, Telethon",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Protocol and authentication, Telethon",
      "display": "MTProto client for bots and user accounts; developer api_id/api_hash plus bot token for a bot session.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Current runtime and required setup, Telethon",
      "display": "{\"requires_python\": \">=3.5\", \"prerequisites\": [\"Requires developer api_id,api_hash,and BotFather bot token,plus writable persistent session storage. Existing session must belong to the intended bot; bot_token only logs in new unauthenticated sessions. Synchronous wrapper recipe is run outside an already-running event loop.\"]}",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Delivery and concurrency model, Telethon",
      "display": "{\"Async request API\": \"Native asyncio MTProto requests; optional telethon.sync facade drives the same coroutine API.\", \"Webhook registration\": \"Native transport is MTProto updates,not HTTP Bot API setWebhook registration. This is native SDK scope,not a claim Telegram lacks HTTP webhooks.\"}",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Actual application argument and return contract, Telethon",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole external telegram-mcp set_bot_commands first checks current User.bot,then constructs BotCommand(command,description),default scope,and SetBotCommandsRequest(scope,lang_code=\\\"en\\\",commands). Current constructors accept these fields; ephemeral is optional. Commands must supply string command/description under Telegram length/character constraints. Caller account must already be authenticated as a bot; client lookup and resolve_entity are actual application helpers retained in host context. This command does not create a bot or configure another bot identified by username; request always changes the authenticated bot. Resolving bot_username only validates/resolves that requested entity and its result is unused.\", \"return_shape\": \"get_me returns current User or None; getattr(None,\\\"bot\\\",False) exits safely. Raw client invocation accepts TLRequest and awaits its Bool result,which is ignored. The returned string is application status,not a checked True response. Arbitrary input commands can still be rejected by the server; exception path uses existing log helper. Actual ordinary-user accounts are explicitly rejected.\"}",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project function, Telethon",
      "display": "@mcp.tool(\n    annotations=ToolAnnotations(\n        title=\"Set Bot Commands\", openWorldHint=True, destructiveHint=True, idempotentHint=True\n    )\n)\n@with_account(readonly=False)\n@flood_category(\"admin_action\")\nasync def set_bot_commands(\n    bot_username: str, commands: list, account: Optional[str] = None\n) -> str:\n    \"\"\"\n    Set bot commands for a bot you own.\n    Note: This function can only be used if the Telegram client is a bot account.\n    Regular user accounts cannot set bot commands.\n\n    Args:\n        bot_username: The username of the bot to set commands for.\n        commands: List of command dictionaries with 'command' and 'description' keys.\n    \"\"\"\n    try:\n        cl = get_client(account)\n        # First check if the current client is a bot\n        me = await cl.get_me()\n        if not getattr(me, \"bot\", False):\n            return (\n                \"Error: This function can only be used by bot accounts. \"\n                \"Your current Telegram account is a regular user account, not a bot.\"\n            )\n\n        # Import required types\n        from telethon.tl.types import BotCommand, BotCommandScopeDefault\n        from telethon.tl.functions.bots import SetBotCommandsRequest\n\n        # Create BotCommand objects from the command dictionaries\n        bot_commands = [\n            BotCommand(command=c[\"command\"], description=c[\"description\"]) for c in commands\n        ]\n\n        # Get the bot entity\n        await resolve_entity(bot_username, cl)\n\n        # Set the commands with proper scope\n        await cl(\n            SetBotCommandsRequest(\n                scope=BotCommandScopeDefault(),\n                lang_code=\"en\",  # Default language code\n                commands=bot_commands,\n            )\n        )\n\n        return f\"Bot commands set for {bot_username}.\"\n    except ImportError as ie:\n        return log_and_format_error(\"set_bot_commands\", ie)\n    except Exception as e:\n        return log_and_format_error(\"set_bot_commands\", e, bot_username=bot_username)\n",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project source file, Telethon",
      "display": "telegram_mcp/tools/profile.py",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project full_name, Telethon",
      "display": "chigwell/telegram-mcp",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project stargazers_count, Telethon",
      "display": "2.1K",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Library name, aiogram",
      "display": "aiogram",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Monthly downloads, aiogram",
      "display": "3.3M",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "License, aiogram",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Package release, aiogram",
      "display": "3.32.0",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Package release date, aiogram",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Install, aiogram",
      "display": "pip install -U aiogram",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Quickstart, aiogram",
      "display": "import asyncio\nimport os\nfrom aiogram import Bot\n\nasync def main():\n    bot = Bot(token=os.environ[\"TELEGRAM_BOT_TOKEN\"])\n    async with bot.context():\n        print(await bot.get_me())\n\nasyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Repository stars, aiogram",
      "display": "5.9K",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Async request API, aiogram",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Webhook registration, aiogram",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Protocol and authentication, aiogram",
      "display": "Asyncio/aiohttp HTTP Bot API framework with Dispatcher/Router integration; current3 series requires Python>=3.11.",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Current runtime and required setup, aiogram",
      "display": "{\"requires_python\": \"<3.16,>=3.11\", \"prerequisites\": [\"Current3.32 requires Python>=3.11,<3.16. Set a BotFather token; context closes the native aiohttp session. asyncio.run belongs in a script outside a running loop.\"]}",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Delivery and concurrency model, aiogram",
      "display": "{\"Async request API\": \"Native asyncio Bot API request coroutine.\", \"Webhook registration\": \"Native HTTP Bot API webhook registration; server and TLS hosting remain caller responsibilities.\"}",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Actual application argument and return contract, aiogram",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole actual aiogram_dialog MessageManager.edit_text supplies chat_id from old_message.chat.id,message_id,business_connection_id,text,reply_markup,parse_mode,and link_preview_options,all present in current3.32 EditMessageText signature. Host NewMessage permits text/rich markup while existing chat/message must be accessible to the bot. This replaces old edit_media whose InputMedia construction passed an unproven reply_markup field. No source modernization.\", \"return_shape\": \"For chat_id/message_id addressing,current method returns Message; bool applies to inline_message_id addressing not used here. The original coroutine directly returns the awaited result. Local logging is not an extra native call.\"}",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Project function, aiogram",
      "display": "async def edit_text(\n        self, bot: Bot, new_message: NewMessage, old_message: OldMessage,\n) -> Message:\n    logger.debug(\"edit_text to %s\", new_message.chat)\n    return await bot.edit_message_text(\n        message_id=old_message.message_id,\n        chat_id=old_message.chat.id,\n        business_connection_id=new_message.business_connection_id,\n        text=new_message.text,\n        reply_markup=new_message.reply_markup,\n        parse_mode=new_message.parse_mode,\n        link_preview_options=new_message.link_preview_options,\n    )\n",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Project source file, aiogram",
      "display": "src/aiogram_dialog/manager/message_manager.py",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Project full_name, aiogram",
      "display": "Tishka17/aiogram_dialog",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Project stargazers_count, aiogram",
      "display": "899",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Library name, pyTelegramBotAPI",
      "display": "pyTelegramBotAPI",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Monthly downloads, pyTelegramBotAPI",
      "display": "906.4K",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "License, pyTelegramBotAPI",
      "display": "GPL-2.0",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Package release, pyTelegramBotAPI",
      "display": "4.37.1",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Package release date, pyTelegramBotAPI",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Install, pyTelegramBotAPI",
      "display": "pip install pyTelegramBotAPI",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Quickstart, pyTelegramBotAPI",
      "display": "import os\nfrom telebot import TeleBot\n\nbot = TeleBot(os.environ[\"TELEGRAM_BOT_TOKEN\"])\nprint(bot.get_me())\n",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Repository stars, pyTelegramBotAPI",
      "display": "8.8K",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Async request API, pyTelegramBotAPI",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Webhook registration, pyTelegramBotAPI",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Protocol and authentication, pyTelegramBotAPI",
      "display": "HTTP Bot API wrapper with traditional TeleBot and separate AsyncTeleBot interfaces; distribution import is telebot.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Current runtime and required setup, pyTelegramBotAPI",
      "display": "{\"requires_python\": \">=3.11\", \"prerequisites\": [\"Current4.37.1 requires Python>=3.11. Set a BotFather token. This is the synchronous first API call,not a polling server; full official echo starter is longer and adds two handlers. The telebot import is supplied by pyTelegramBotAPI,not telebot_router.\"]}",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Delivery and concurrency model, pyTelegramBotAPI",
      "display": "{\"Async request API\": \"Native AsyncTeleBot facade is separate from synchronous TeleBot; async polling example uses asyncio.run.\", \"Webhook registration\": \"Native HTTP Bot API webhook registration; registration is separate from HTTP handler hosting.\"}",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Actual application argument and return contract, pyTelegramBotAPI",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole BetterForward setup registers separate private-chat and configured group-chat command scopes. Current4.37.1 set_my_commands accepts list[BotCommand] plus scope; BotCommand two positional strings remain valid with optional ephemeral omitted; both scope constructors remain current. Caller localization must supply nonempty descriptions within Telegram limits and group_id must identify an accessible group. Synchronous telebot.TeleBot binding in immutable host is preserved; unrelated telebot_router package is not substituted.\", \"return_shape\": \"set_my_commands returns bool,ignored. Native BotCommand and scope objects serialize through TeleBot. Both registrations execute sequentially; group permission and Telegram server validation can still reject the call.\"}",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project function, pyTelegramBotAPI",
      "display": "def _set_bot_commands(self):\n    \"\"\"Set bot commands for different scopes.\"\"\"\n    self.bot.set_my_commands([\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"help\", _(\"Show help\")),\n    ], scope=types.BotCommandScopeAllPrivateChats())\n\n    self.bot.set_my_commands([\n        types.BotCommand(\"help\", _(\"Show help\")),\n        types.BotCommand(\"ban\", _(\"Ban a user\")),\n        types.BotCommand(\"unban\", _(\"Unban a user\")),\n        types.BotCommand(\"delete\", _(\"Delete a message\")),\n        types.BotCommand(\"terminate\", _(\"Terminate a thread\")),\n        types.BotCommand(\"verify\", _(\"Set verified status\")),\n        types.BotCommand(\"setnote\", _(\"Set or clear topic note\")),\n        types.BotCommand(\"getnote\", _(\"Show topic note\")),\n        types.BotCommand(\"refresh\", _(\"Refresh user info\")),\n        types.BotCommand(\"allow\", _(\"Allow user permissions\")),\n        types.BotCommand(\"disallow\", _(\"Disallow user permissions\")),\n        types.BotCommand(\"permissions\", _(\"Show user permissions\")),\n        types.BotCommand(\"resetpermissions\", _(\"Reset user permission overrides\")),\n        types.BotCommand(\"stats\", _(\"Show statistics\")),\n        types.BotCommand(\"info\", _(\"Show user info\")),\n        types.BotCommand(\"r\", _(\"Send a reply template\")),\n    ], scope=types.BotCommandScopeChat(self.group_id))\n",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Project source file, pyTelegramBotAPI",
      "display": "src/bot.py",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Project full_name, pyTelegramBotAPI",
      "display": "SideCloudGroup/BetterForward",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Project stargazers_count, pyTelegramBotAPI",
      "display": "737",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Library name, Pyrogram",
      "display": "Pyrogram",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Monthly downloads, Pyrogram",
      "display": "402.0K",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "License, Pyrogram",
      "display": "LGPL-3.0",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Package release, Pyrogram",
      "display": "2.0.106",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Package release date, Pyrogram",
      "display": "Apr 2023",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Install, Pyrogram",
      "display": "pip3 install pyrogram",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Quickstart, Pyrogram",
      "display": "import asyncio\nimport os\nfrom pyrogram import Client\n\nasync def main():\n    async with Client(\"bot\", int(os.environ[\"TELEGRAM_API_ID\"]), os.environ[\"TELEGRAM_API_HASH\"],\n                      bot_token=os.environ[\"TELEGRAM_BOT_TOKEN\"]) as app:\n        print(await app.get_me())\n\nasyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Official description, Pyrogram",
      "display": "Provides an asynchronous Telegram MTProto API framework for users and bots.",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Quickstart source file, Pyrogram",
      "display": "pyrogram/client.py",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Repository stars, Pyrogram",
      "display": "4.6K",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Async request API, Pyrogram",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Webhook registration, Pyrogram",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Protocol and authentication, Pyrogram",
      "display": "MTProto client for bots and users;2.0.106 distribution retained by actual download rank and explicitly scoped current API rather than age alone.",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Current runtime and required setup, Pyrogram",
      "display": "{\"requires_python\": \"~=3.7\", \"prerequisites\": [\"Requires api_id,api_hash,bot token,and writable session storage. Current2.0.106 Requires-Python is ~=3.7; no unbounded latest-interpreter compatibility claim. SDK is archived; examples are checked by API shape rather than age. Bot login replaces the user-login/self-chat official starter because bots cannot use Saved Messages.\"]}",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Delivery and concurrency model, Pyrogram",
      "display": "{\"Async request API\": \"Native asyncio MTProto request methods; optional synchronous facade exists.\", \"Webhook registration\": \"Native transport is MTProto,not an HTTP Bot API webhook. No source claim that a Telegram service webhook feature is absent.\"}",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Library name, telebot",
      "display": "telebot",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Monthly downloads, telebot",
      "display": "112.7K",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "License, telebot",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Package release, telebot",
      "display": "0.0.5",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Package release date, telebot",
      "display": "Feb 2023",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Install, telebot",
      "display": "pip install telebot",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Quickstart, telebot",
      "display": "import os\nfrom telebot_router import TeleBot\n\napp = TeleBot(__name__)\napp.config[\"api_key\"] = os.environ[\"TELEGRAM_BOT_TOKEN\"]\nprint(app.get_me())\n",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Official description, telebot",
      "display": "Builds Telegram bots with route decorators.",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Quickstart source file, telebot",
      "display": "telebot_router/__init__.py",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Repository stars, telebot",
      "display": "53",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Async request API, telebot",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Webhook registration, telebot",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Protocol and authentication, telebot",
      "display": "Small independent synchronous HTTP router imported as telebot_router; includes pyTelegramBotAPI to accommodate mistaken installs. Counts do not identify which bundled SDK callers use.",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Current runtime and required setup, telebot",
      "display": "{\"requires_python\": \"\", \"prerequisites\": [\"Independent telebot_router API,not pyTelegramBotAPI TeleBot. Set BotFather token. Requires-Python is unspecified; no guaranteed current-Python range is invented. get_me returns raw HTTP JSON envelope; inspect ok/result/errors. Install command is mechanically derived from the verified registry distribution name because the small README lacks an install command.\"]}",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Delivery and concurrency model, telebot",
      "display": "{\"Async request API\": \"Complete native router uses blocking requests and a synchronous polling loop; no awaitable HTTP request facade in this small public surface.\", \"Webhook registration\": \"Native listen is explicitly NotImplemented. Complete public request surface exposes get_me,send_message,and get_updates,without setWebhook. Installing its bundled separate pyTelegramBotAPI dependency does not change this native router API.\"}",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Library name, telepot",
      "display": "Telepot",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Monthly downloads, telepot",
      "display": "14.0K",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "License, telepot",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Package release, telepot",
      "display": "12.7",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Package release date, telepot",
      "display": "May 2018",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Install, telepot",
      "display": "pip install telepot",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Quickstart, telepot",
      "display": "import telepot\nbot = telepot.Bot('***** PUT YOUR TOKEN HERE *****')\nbot.getMe()\n",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Official description, telepot",
      "display": "Provides a framework for the Telegram Bot API.",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Quickstart source file, telepot",
      "display": "index.rst",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Repository stars, telepot",
      "display": "2.4K",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Async request API, telepot",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Webhook registration, telepot",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Protocol and authentication, telepot",
      "display": "Traditional threaded HTTP Bot API client plus separate asyncio version. Published12.7 native API is historical,not a tested current-runtime guarantee.",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Current runtime and required setup, telepot",
      "display": "{\"requires_python\": \"\", \"prerequisites\": [\"Replace the original token placeholder with your BotFather token. Source is the native traditional synchronous API; async telepot.aio is separate. Published12.7 lacks a Requires-Python declaration; docs describe historical Python2.7/3 support,not tested support for every current interpreter.\"]}",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Delivery and concurrency model, telepot",
      "display": "{\"Async request API\": \"Native telepot.aio version supplies coroutine requests; traditional telepot.Bot is blocking.\", \"Webhook registration\": \"Native traditional Bot exposes HTTP Bot API webhook registration; receiver loop/server hosting is separate.\"}",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Actual application argument and return contract, telepot",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole original authored quiz application constructs four distractors plus the answer,sorts them,and edits the quiz message through the native bound Editor with inline_keyboard rows. Each button uses text and callback_data strings; current12.7 namedtuple declarations accept both. Native Editor binds the message identifier in its current helper implementation and forwards text/reply_markup to Bot.editMessageText. This is actual bot application state,not an SDK unit test or a vendored implementation.\", \"return_shape\": \"Random arithmetic answer is returned for the caller score comparison; edited Message/boolean result is ignored. Duplicated random choices are possible and are not deduplicated. Helper-bound message identity is supplied by CallbackQueryOrigin in enclosing Quizzer; the function is not standalone and sends no new message. No token or Telegram call executed.\"}",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Library name, python-telegram",
      "display": "python-telegram",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Monthly downloads, python-telegram",
      "display": "6.2K",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "License, python-telegram",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Package release, python-telegram",
      "display": "2.0.0",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Package release date, python-telegram",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Install, python-telegram",
      "display": "pip install python-telegram",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Quickstart, python-telegram",
      "display": "import argparse\n\nfrom telegram.client import Telegram\n\n\ndef bot_get_me(api_id, api_hash, token):\n    tg = Telegram(\n        api_id=api_id,\n        api_hash=api_hash,\n        bot_token=token,\n        database_encryption_key=\"changeme1234\",\n    )\n    # you must call login method before others\n    tg.login()\n\n    result = tg.get_me()\n    result.wait()\n    print(result.update)\n    tg.stop()\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser()\n    parser.add_argument(\"api_id\", help=\"API id\")  # https://my.telegram.org/apps\n    parser.add_argument(\"api_hash\", help=\"API hash\")\n    parser.add_argument(\"token\", help=\"Bot token\")\n    args = parser.parse_args()\n    bot_get_me(args.api_id, args.api_hash, args.token)\n",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Official description, python-telegram",
      "display": "Builds Telegram clients in Python.",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Quickstart source file, python-telegram",
      "display": "examples/bot_login.py",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Repository stars, python-telegram",
      "display": "725",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Async request API, python-telegram",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Webhook registration, python-telegram",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Protocol and authentication, python-telegram",
      "display": "TDLib client for bots and users. Requires native TDLib,developer credentials,bot token or phone login,and persistent local state; request results use AsyncResult.wait.",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Current runtime and required setup, python-telegram",
      "display": "{\"requires_python\": \">=3.10\", \"prerequisites\": [\"Requires Python>=3.10,api_id,api_hash,bot token,a local TDLib database encryption key,and native TDLib library. Replace the example encryption key before real use. Save as bot_login.py and run python bot_login.py API_ID API_HASH BOT_TOKEN with your own values. Current published wheels support the documented platforms; Windows requires separate supported TDLib setup rather than an invented bundled wheel.\"]}",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Delivery and concurrency model, python-telegram",
      "display": "{\"Async request API\": \"TDLib runs asynchronously on native/background threads,but Python calls return AsyncResult with blocking wait rather than native asyncio coroutine requests.\", \"Webhook registration\": \"TDLib bot authorization and native updates,not HTTP Bot API webhook registration. Scope is selected Python TDLib wrapper,not the service capability.\"}",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python Telegram bot libraries python-telegram-bot pyTelegramBotAPI aiogram Telethon examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
