Account

Posts of aiogram live

newest first

#143Link preview
Views991−30%vs avg
Forwards—
Reactions35
Comments—
#142Link preview
Views1,390−2%vs avg
Forwards—
Reactions24
Comments—
#141Text

🚀 aiogram 3.32.0 is out! Bot API 10.4 • Widgets: send_widget, send_shared_widget, answer_widget_query, edit_message_widget_data, edit_shared_widget_data, new widget_query / shared_widget_query updates with router observers • Ephemeral messages: replies to callback queries in any chat, chat_id of the send methods is now optional (pass None for an ephemeral reply without a chat) • TON wallet: wallet cards, ton_wallet_transfer service messages, ton_address rich text and entities • Chat share themes, get_unique_gift, delete_business_account_gift, quotes from rich messages, paid_messages_waived, custom descriptions for verify_user / verify_chat Features • Python 3.15 support • tasks_shutdown_timeout for start_polling() / run_polling(): graceful wait for running handlers on stop • Enums are now StrEnum: f"{ParseMode.HTML}" gives HTML • Bot.usernames(), and Command filter now accepts commands addressed to secondary usernames • Opt-in fsm_key_on_sender_chat: separate FSM states for anonymous admins and users posting as a channel • ~1.5x faster parsing of Bot API responses Notable fixes • Link URLs and entity attributes are now escaped in HTML/MarkdownV2 (reported by Anthropic OSS Scanner) • Exponential slowdown on deeply nested rich text • send_copy() keeps much more of the source message and can copy rich messages and checklists • Business messages: correct replies, chat actions, no unsupported business_connection_id • Answers in channel direct messages chats stay in the same topic • MarkdownV2 custom emoji and blockquote rendering, HTML pre language • Keyboard builders no longer drop markup options • CommandStart(deep_link_encoded=True) no longer crashes on invalid payloads • create_channel_bot_link(), startapp payload limit (512), is_chat_member() helper • Async callable objects are awaited as handlers/filters • Scenes on.* markers cover all update types ⚠️ Breaking changes, read before upgrading • Python 3.10 dropped, minimum is 3.11 • answer_* / reply_* shortcuts no longer take direct_messages_topic_id, so optional positional arguments shifted by one; pass them by keyword • FSM keys of guest chats now have a guest part; use DefaultKeyBuilder(with_guest=False) to keep old keys • Pass raw URLs to link(), hlink(), TextLink: pre-escaped URLs are now escaped twice • Message.delete() / react() raise for business messages • CallbackData: an empty part unpacks to None for optional fields • ClientDecodeError.data now holds the raw response body • StoryAreaPosition deprecated in favour of AreaPosition • remove_unset() removed 📄 Full changelog: https://docs.aiogram.dev/en/latest/changelog.html 📦 pip install -U aiogram

Open in Telegram
Views1,890+33%vs avg
Forwards—
Reactions49
Comments—
#140Link preview

🤖 aiogram 3.31.0 is here Full support for Bot API 10.3 has been added. Your rich messages stop being read-only documents and start pushing back. 📄 The headliner is buttons in Rich Messages: RichMessageButton puts real, clickable buttons inside a rich message — inline in the text as a RichTextButton, or as a whole row via InputRichBlockButtons. Wrap one in DisabledButton and it renders but stays inert. Rich messages also gained a document block, collapsed (expandable) block quotations, compact tables, tg://document?id= media links, and maps that are no longer stuck in the 13–20 zoom range. 🧱 Keyboards got three things you've wanted for years: disabled on InlineKeyboardButton, force_reply directly on the markup, and a LINK button style that renders a callback button as a plain link. ⌨️ Ephemeral messages grew up: the pile of receiver_user_id / callback_query_id arguments is replaced by a single ephemeral_message_parameters, and an ephemeral message can now be edited into a full rich message. Message.as_ephemeral_message_parameters() builds it for you. 👻 And message drafts can now be stopped: can_stop and keep_on_stop on sendMessageDraft / sendRichMessageDraft let a user halt generation mid-stream while you decide whether the half-written message survives. Handle it with the new @router.stopped_message_generation() observer. ⏹ Full changelog: https://docs.aiogram.dev/en/latest/changelog.html ✨ Star this message if you've ever shipped a button that did nothing — it's a feature now. You can install this version from PyPI: pip install -U aiogram

Open in Telegram
Views3,190+124%vs avg
Forwards—
Reactions64
Comments—
#139Link preview
Views5,000+251%vs avg
Forwards—
Reactions55
Comments—
#137Text
Views4,600+223%vs avg
Forwards—
Reactions31
Comments—
#136Text
Views4,670+228%vs avg
Forwards—
Reactions113
Comments—
#135Link preview
Views3,920+175%vs avg
Forwards—
Reactions257
Comments—
#134Link preview
Views3,390+138%vs avg
Forwards—
Reactions42
Comments—
#133Text
Views2,850+100%vs avg
Forwards—
Reactions38
Comments—
#132Link preview
Views4,600+223%vs avg
Forwards—
Reactions48
Comments—