Changelog¶
3.27.0 (2026-04-04)¶
Features¶
Added __eq__ and __hash__ methods to the Default class. #1707
Bugfixes¶
CommandStart(deep_link=False)now correctly rejects messages that contain deep-link arguments. Previouslydeep_link=False(the default) did not distinguish between/startand/start <payload>. The default is changed toNone(accept both) to preserve backward compatibility. #1713Fixed
HtmlDecoration.custom_emoji()to use the correctemoji-idattribute name instead ofemoji_idin the<tg-emoji>tag, matching the Telegram Bot API specification. #1782Remove redundant list() around sorted() and fix router type name in validation error message #1788
Misc¶
Updated to Bot API 9.6
Managed Bots
New Methods:
Added
aiogram.methods.get_managed_bot_token.GetManagedBotTokenmethod - retrieves the token of a managed botAdded
aiogram.methods.replace_managed_bot_token.ReplaceManagedBotTokenmethod - generates a new token for a managed bot, invalidating the previous oneAdded
aiogram.methods.save_prepared_keyboard_button.SavePreparedKeyboardButtonmethod - saves a keyboard button to be used in Mini Apps viarequestChat
New Types:
Added
aiogram.types.keyboard_button_request_managed_bot.KeyboardButtonRequestManagedBottype - defines criteria for selecting a managed bot via a keyboard buttonAdded
aiogram.types.managed_bot_created.ManagedBotCreatedtype - describes a service message about a managed bot being createdAdded
aiogram.types.managed_bot_updated.ManagedBotUpdatedtype - describes updates to a managed botAdded
aiogram.types.prepared_keyboard_button.PreparedKeyboardButtontype - represents a prepared keyboard button for use in Mini Apps
New Fields:
Added
can_manage_botsfield toaiogram.types.user.User- indicates whether the bot can manage other botsAdded
request_managed_botfield toaiogram.types.keyboard_button.KeyboardButton- requests the user to select a managed botAdded
managed_bot_createdfield toaiogram.types.message.Message- service message about a managed bot being created (type:aiogram.types.managed_bot_created.ManagedBotCreated)Added
managed_botfield toaiogram.types.update.Update- contains updates received by a managed bot
Polls
New Types:
Added
aiogram.types.poll_option_added.PollOptionAddedtype - describes a service message about a new option added to a pollAdded
aiogram.types.poll_option_deleted.PollOptionDeletedtype - describes a service message about a poll option being deleted
New Fields:
Replaced
correct_option_idwithcorrect_option_idsinaiogram.types.poll.Poll- supports multiple correct answers for quiz pollsAdded
allows_revotingfield toaiogram.types.poll.Poll- indicates whether users are allowed to change their voteAdded
descriptionanddescription_entitiesfields toaiogram.types.poll.Poll- optional poll description with formatting entitiesAdded
persistent_idfield toaiogram.types.poll_option.PollOption- stable identifier for a poll optionAdded
added_by_userandadded_by_chatfields toaiogram.types.poll_option.PollOption- identifies who added the optionAdded
addition_datefield toaiogram.types.poll_option.PollOption- date when the option was addedAdded
option_persistent_idsfield toaiogram.types.poll_answer.PollAnswer- persistent IDs of the chosen optionsAdded
poll_option_idfield toaiogram.types.reply_parameters.ReplyParameters- allows replying to a specific poll optionAdded
reply_to_poll_option_idfield toaiogram.types.message.Message- the persistent ID of the poll option the message replies to
New Parameters for
aiogram.methods.send_poll.SendPoll:Replaced
correct_option_idwithcorrect_option_ids- supports multiple correct answers for quiz pollsAdded
allows_revoting- allows users to change their vote after submissionAdded
shuffle_options- randomizes the order of poll options for each userAdded
allow_adding_options- allows users to add their own poll optionsAdded
hide_results_until_closes- hides vote results until the poll is closedAdded
description,description_parse_mode,description_entities- optional poll description with parse mode and formatting
3.26.0 (2026-03-03)¶
Bugfixes¶
Fixed scene transitions to preserve middleware-injected data when moving between scenes via
SceneWizard.goto. #1687Added
icon_custom_emoji_idandstyleparameters toInlineKeyboardBuilder.buttonandReplyKeyboardBuilder.buttonsignatures. #1768Fixed Pydantic protected namespace warning for model_custom_emoji_id by adding protected_namespaces=() to model_config. #1772
Misc¶
Documented webhook security constraints for proxy deployments, including trust requirements for
X-Forwarded-Forand recommended defense-in-depth checks. #47Updated to Bot API 9.5
New Methods:
Added
aiogram.methods.send_message_draft.SendMessageDraftmethod - allowed for all bots to stream partial messages while they are being generatedAdded
aiogram.methods.set_chat_member_tag.SetChatMemberTagmethod - allows bots to set a custom tag for a chat member; available viaaiogram.types.chat.Chat.set_member_tag()shortcut
New Fields:
Added
date_timetype toaiogram.types.message_entity.MessageEntitywithunix_timeanddate_time_formatfields - allows bots to display a formatted date and time to the userAdded
tagfield toaiogram.types.chat_member_member.ChatMemberMemberandaiogram.types.chat_member_restricted.ChatMemberRestricted- the custom tag set for the chat memberAdded
can_edit_tagfield toaiogram.types.chat_member_restricted.ChatMemberRestrictedandaiogram.types.chat_permissions.ChatPermissions- indicates whether the user is allowed to edit their own tagAdded
can_manage_tagsfield toaiogram.types.chat_member_administrator.ChatMemberAdministratorandaiogram.types.chat_administrator_rights.ChatAdministratorRights- indicates whether the administrator can manage tags of other chat membersAdded
can_manage_tagsparameter toaiogram.methods.promote_chat_member.PromoteChatMembermethodAdded
sender_tagfield toaiogram.types.message.Message- the tag of the message sender in the chat
3.25.0 (2026-02-10)¶
Features¶
Add full_name property to Contact and corresponding tests #1758
Updated to Bot API 9.4 (February 9, 2026)
New Features:
Bots with Premium subscriptions can now use custom emoji directly in messages to private, group, and supergroup chats
Bots can create topics in private chats via the
aiogram.methods.create_forum_topic.CreateForumTopicmethodBots can prevent users from creating/deleting topics in private chats through BotFather settings
New Fields:
Added
allows_users_to_create_topicsfield toaiogram.types.user.Userclass - indicates whether the user allows others to create topics in chats with themAdded
icon_custom_emoji_idfield toaiogram.types.keyboard_button.KeyboardButtonandaiogram.types.inline_keyboard_button.InlineKeyboardButtonclasses - allows displaying custom emoji icons on buttonsAdded
stylefield toaiogram.types.keyboard_button.KeyboardButtonandaiogram.types.inline_keyboard_button.InlineKeyboardButtonclasses - changes button color/styleAdded
chat_owner_leftfield toaiogram.types.message.Messageclass - service message indicating chat owner has left (type:aiogram.types.chat_owner_left.ChatOwnerLeft)Added
chat_owner_changedfield toaiogram.types.message.Messageclass - service message indicating chat ownership has transferred (type:aiogram.types.chat_owner_changed.ChatOwnerChanged)Added
qualitiesfield toaiogram.types.video.Videoclass - list of available video quality options (type:list[aiogram.types.video_quality.VideoQuality])Added
first_profile_audiofield toaiogram.types.chat_full_info.ChatFullInfoclass - user’s first profile audioAdded
rarityfield toaiogram.types.unique_gift_model.UniqueGiftModelclassAdded
is_burnedfield toaiogram.types.unique_gift.UniqueGiftclass
New Methods:
Added
aiogram.methods.set_my_profile_photo.SetMyProfilePhotomethod - allows bots to set their profile photoAdded
aiogram.methods.remove_my_profile_photo.RemoveMyProfilePhotomethod - allows bots to remove their profile photoAdded
aiogram.methods.get_user_profile_audios.GetUserProfileAudiosmethod - retrieves a user’s profile audio listAdded
aiogram.types.user.User.get_profile_audios()shortcut - creates a prefilledaiogram.methods.get_user_profile_audios.GetUserProfileAudiosrequest withuser_id
New Types:
Added
aiogram.types.chat_owner_left.ChatOwnerLefttype - describes a service message about the chat owner leaving the chatAdded
aiogram.types.chat_owner_changed.ChatOwnerChangedtype - describes a service message about an ownership change in the chatAdded
aiogram.types.video_quality.VideoQualitytype - describes available video quality optionsAdded
aiogram.types.user_profile_audios.UserProfileAudiostype - represents the collection of audios displayed on a user’s profile
Bugfixes¶
Fixed scene handling for
channel_postandedited_channel_postwhen Scenes are registered but FSM state is unavailable, and added channel-scoped FSM context support forCHAT/CHAT_TOPICstrategies. #1743
Misc¶
Migrated from Black and isort to Ruff for code formatting and linting, a modern, blazingly fast formatter and linter written in Rust.
Enabled additional ruff rule sets.
For end users:
No changes required. This is purely a development tooling change that doesn’t affect the library API or behavior.
For contributors:
Use
make reformatoruv run ruff formatto format code (replacesblackandisort)Use
make lintto check code quality (now includes formatting, linting, and type checking)Pre-commit hooks automatically updated to use
ruffandruff-formatCI/CD pipelines updated to use ruff in GitHub Actions workflows
Benefits:
10-100x faster formatting and linting compared to Black + isort + flake8
Single tool for formatting, import sorting, and linting
More comprehensive code quality checks out of the box
Auto-fixes for many common issues (33 issues auto-fixed during migration)
Better integration with modern Python development workflows
This change improves the developer experience and code quality while maintaining the same code style standards. #1750
3.24.0 (2026-01-02)¶
Features¶
Added full support for Telegram Bot API 9.3
Topics in Private Chats
Bot API 9.3 introduces forum topics functionality for private chats:
Added new
sendMessageDraftmethod for streaming partial messages while being generated (requires forum topic mode enabled)Added
has_topics_enabledfield to theUserclass to determine if forum topic mode is enabled in private chatsAdded
message_thread_idandis_topic_messagefields to theMessageclass for private chat topic supportAdded
message_thread_idparameter support to messaging methods:sendMessage,sendPhoto,sendVideo,sendAnimation,sendAudio,sendDocument,sendPaidMedia,sendSticker,sendVideoNote,sendVoice,sendLocation,sendVenue,sendContact,sendPoll,sendDice,sendInvoice,sendGame,sendMediaGroup,copyMessage,copyMessages,forwardMessage,forwardMessagesUpdated
sendChatActionto supportmessage_thread_idparameter in private chatsUpdated
editForumTopic,deleteForumTopic,unpinAllForumTopicMessagesmethods to manage private chat topicsAdded
is_name_implicitfield toForumTopicclass
Gifts System Enhancements
Enhanced gifts functionality with new methods and extended capabilities:
Added
getUserGiftsmethod to retrieve gifts owned and hosted by a userAdded
getChatGiftsmethod to retrieve gifts owned by a chatUpdated
UniqueGiftInfoclass: replacedlast_resale_star_countwithlast_resale_currencyandlast_resale_amountfields, added “gifted_upgrade” and “offer” as origin valuesUpdated
getBusinessAccountGiftsmethod: replacedexclude_limitedparameter withexclude_limited_upgradableandexclude_limited_non_upgradable, addedexclude_from_blockchainparameterAdded new fields to
Giftclass:personal_total_count,personal_remaining_count,is_premium,has_colors,unique_gift_variant_count,gift_backgroundAdded new fields to
UniqueGiftclass:gift_id,is_from_blockchain,is_premium,colorsAdded new fields to gift info classes:
is_upgrade_separate,unique_gift_numberAdded
gift_upgrade_sentfield to theMessageclassAdded
gifts_from_channelsfield to theAcceptedGiftTypesclassAdded new
UniqueGiftColorsclass for color schemes in user names and link previewsAdded new
GiftBackgroundclass for gift background styling
Business Accounts & Stories
Added
repostStorymethod to enable reposting stories across managed business accounts
Miscellaneous Updates
Bots can now disable main usernames and set
can_restrict_membersrights in channelsMaximum paid media price increased to 25000 Telegram Stars
Added new
UserRatingclassAdded
rating,paid_message_star_count,unique_gift_colorsfields to theChatFullInfoclassAdded support for
message_effect_idparameter in forward/copy operationsAdded
completed_by_chatfield to theChecklistTaskclass
Bugfixes¶
Misc¶
Migrated from
hatchtouvfor dependency management and development workflows.This change improves developer experience with significantly faster dependency resolution (10-100x faster than pip), automatic virtual environment management, and reproducible builds through lockfile support.
What changed for contributors:
Install dependencies with
uv sync --all-extras --group dev --group testinstead ofpip install -e .[dev,test,docs]Run commands with
uv runprefix (e.g.,uv run pytest,uv run black)All Makefile commands now use
uvinternally (make install,make test,make lint, etc.)Version bumping now uses a custom
scripts/bump_version.pyscript instead ofhatch version
What stayed the same:
Build backend remains
hatchling(no changes to package building)Dynamic version reading from
aiogram/__meta__.pystill worksAll GitHub Actions CI/CD workflows updated to use
uvReadTheDocs builds continue to work without changes
Development dependencies (
dev,test) moved to[dependency-groups]sectionDocumentation dependencies (
docs) remain in[project.optional-dependencies]for compatibility
Contributors can use either the traditional
pip/venvworkflow or the newuvworkflow - both are documented in the contributing guide. #1748Updated type hints in the codebase to Python 3.10+ style unions and optionals. #1749
3.23.0 (2025-12-07)¶
Features¶
This PR updates the codebase to support Python 3.14.
Updated project dep aiohttp
Updated development deps
Fixed tests to support Py3.14
Refactored uvloop using due to deprecation of asyncio.set_event_loop_police
Deprecations and Removals¶
This PR updates the codebase following the end of life for Python 3.9.
Reference: https://devguide.python.org/versions/
Updated type annotations to Python 3.10+ style, replacing deprecated
List,Set, etc., with built-inlist,set, and related types.Refactored code by simplifying nested
ifexpressions.Updated several dependencies, including security-related upgrades.
Misc¶
3.22.0 (2025-08-17)¶
Features¶
Support validating init data using only bot id. #1715
Added full support for the Bot API 9.2:
Direct Messages in Channels
Added the field
is_direct_messagesto the classesaiogram.types.chat.Chatandaiogram.types.chat_full_info.ChatFullInfo, indicating whether the chat is a direct messages chat.Added the field
parent_chatto the classaiogram.types.chat_full_info.ChatFullInfo, describing the parent channel for direct messages chats.Added the class
aiogram.types.direct_messages_topic.DirectMessagesTopicrepresenting a direct messages topic.Added the field
direct_messages_topicto the classaiogram.types.message.Message, describing the direct messages topic associated with a message.Added the parameter
direct_messages_topic_idto multiple sending methods for directing messages to specific direct message topics.
Suggested Posts
Added the class
aiogram.types.suggested_post_parameters.SuggestedPostParametersrepresenting parameters for suggested posts.Added the parameter
suggested_post_parametersto various sending methods, allowing bots to create suggested posts for channel approval.Added the method
aiogram.methods.approve_suggested_post.ApproveSuggestedPost, allowing bots to approve suggested posts in direct messages chats.Added the method
aiogram.methods.decline_suggested_post.DeclineSuggestedPost, allowing bots to decline suggested posts in direct messages chats.Added the field
can_manage_direct_messagesto administrator-related classesaiogram.types.chat_administrator_rights.ChatAdministratorRightsandaiogram.types.chat_member_administrator.ChatMemberAdministrator.Added the class
aiogram.types.suggested_post_info.SuggestedPostInforepresenting information about a suggested post.Added the class
aiogram.types.suggested_post_price.SuggestedPostPricerepresenting the price for a suggested post.Added service message classes for suggested post events:
aiogram.types.suggested_post_approved.SuggestedPostApprovedand the fieldsuggested_post_approvedtoaiogram.types.message.Messageaiogram.types.suggested_post_approval_failed.SuggestedPostApprovalFailedand the fieldsuggested_post_approval_failedtoaiogram.types.message.Messageaiogram.types.suggested_post_declined.SuggestedPostDeclinedand the fieldsuggested_post_declinedtoaiogram.types.message.Messageaiogram.types.suggested_post_paid.SuggestedPostPaidand the fieldsuggested_post_paidtoaiogram.types.message.Messageaiogram.types.suggested_post_refunded.SuggestedPostRefundedand the fieldsuggested_post_refundedtoaiogram.types.message.Message
Enhanced Checklists
Added the field
checklist_task_idto the classaiogram.types.reply_parameters.ReplyParameters, allowing replies to specific checklist tasks.Added the field
reply_to_checklist_task_idto the classaiogram.types.message.Message, indicating which checklist task a message is replying to.
Gifts Improvements
Added the field
publisher_chatto the classesaiogram.types.gift.Giftandaiogram.types.unique_gift.UniqueGift, describing the chat that published the gift.
Additional Features
Added the field
is_paid_postto the classaiogram.types.message.Message, indicating whether a message is a paid post.
Bugfixes¶
Use hmac.compare_digest for validating WebApp data to prevent timing attacks. #1709
Misc¶
Migrated MongoStorage from relying on deprecated motor package to using new async PyMongo. To use mongo storage with new async PyMongo, you need to install the PyMongo package instead of motor and just substitute deprecated MongoStorage with PyMongoStorage class, no other action needed. #1705
3.21.0 (2025-07-05)¶
Features¶
Refactor methods input types to calm down MyPy. #1682
Dict[str, Any] is replaced with Mapping[str, Any] in the following methods:
FSMContext.set_data
FSMContext.update_data
BaseStorage.set_data
BaseStorage.update_data
BaseStorage’s child methods
SceneWizard.set_data
SceneWizard.update_data
Add support for State type in scenes methods like goto, enter, get #1685
Added full support for the Bot API 9.1:
Checklists
Added the class
aiogram.types.checklist_task.ChecklistTaskrepresenting a task in a checklist.Added the class
aiogram.types.checklist.Checklistrepresenting a checklist.Added the class
aiogram.types.input_checklist_task.InputChecklistTaskrepresenting a task to add to a checklist.Added the class
aiogram.types.input_checklist.InputChecklistrepresenting a checklist to create.Added the field
checklistto the classesaiogram.types.message.Messageandaiogram.types.external_reply_info.ExternalReplyInfo, describing a checklist in a message.Added the class
aiogram.types.checklist_tasks_done.ChecklistTasksDoneand the fieldchecklist_tasks_doneto the classaiogram.types.message.Message, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done).Added the class
aiogram.types.checklist_tasks_added.ChecklistTasksAddedand the fieldchecklist_tasks_addedto the classaiogram.types.message.Message, describing a service message about the addition of new tasks to a checklist.Added the method
aiogram.methods.send_checklist.SendChecklist, allowing bots to send a checklist on behalf of a business account.Added the method
aiogram.methods.edit_message_checklist.EditMessageChecklist, allowing bots to edit a checklist on behalf of a business account.
Gifts
Added the field
next_transfer_dateto the classesaiogram.types.owned_gift_unique.OwnedGiftUniqueandaiogram.types.unique_gift_info.UniqueGiftInfo.Added the field
last_resale_star_countto the classaiogram.types.unique_gift_info.UniqueGiftInfo.Added “resale” as the possible value of the field
originin the classaiogram.types.unique_gift_info.UniqueGiftInfo.
General
Increased the maximum number of options in a poll to 12.
Added the method
aiogram.methods.get_my_star_balance.GetMyStarBalance, allowing bots to get their current balance of Telegram Stars.Added the class
aiogram.types.direct_message_price_changed.DirectMessagePriceChangedand the fielddirect_message_price_changedto the classaiogram.types.message.Message, describing a service message about a price change for direct messages sent to the channel chat.
Bugfixes¶
Improved Documentation¶
Added documentation for changing state of another user in FSM #1633
Misc¶
Fixed MyPy [return-value] error in InlineKeyboardBuilder().as_markup(). as_markup method now overloads parent class method and uses super(), to call parent’s as_markup method. Also added correct type hint to as_markup’s return in InlineKeyboardBuilder and ReplyKeyboardBuilder classes. #1677
Changed Babel’s pinned version from minor to major. #1681
Increased max
aiohttpversion support from “<3.12” to “<3.13” #1700
3.20.0 (2025-04-14)¶
Features¶
Add different shortcut methods for
aiogram.utils.formatting.Text.as_kwargs()#1657Added full support for the Bot API 9.0:
Business Accounts
Added the class
aiogram.types.business_bot_rights.BusinessBotRightsand replaced the fieldcan_replywith the fieldrightsof the typeaiogram.types.business_bot_rights.BusinessBotRightsin the classaiogram.types.business_connection.BusinessConnection.Added the method
aiogram.methods.read_business_message.ReadBusinessMessage, allowing bots to mark incoming messages as read on behalf of a business account.Added the method
aiogram.methods.delete_business_messages.DeleteBusinessMessages, allowing bots to delete messages on behalf of a business account.Added the method
aiogram.methods.set_business_account_name.SetBusinessAccountName, allowing bots to change the first and last name of a managed business account.Added the method
aiogram.methods.set_business_account_username.SetBusinessAccountUsername, allowing bots to change the username of a managed business account.Added the method
aiogram.methods.set_business_account_bio.SetBusinessAccountBio, allowing bots to change the bio of a managed business account.Added the class
aiogram.types.input_profile_photo.InputProfilePhoto, describing a profile photo to be set.Added the methods
aiogram.methods.set_business_account_profile_photo.SetBusinessAccountProfilePhotoandaiogram.methods.remove_business_account_profile_photo.RemoveBusinessAccountProfilePhoto, allowing bots to change the profile photo of a managed business account.Added the method
aiogram.methods.set_business_account_gift_settings.SetBusinessAccountGiftSettings, allowing bots to change the privacy settings pertaining to incoming gifts in a managed business account.Added the class
aiogram.types.star_amount.StarAmountand the methodaiogram.methods.get_business_account_star_balance.GetBusinessAccountStarBalance, allowing bots to check the current Telegram Star balance of a managed business account.Added the method
aiogram.methods.transfer_business_account_stars.TransferBusinessAccountStars, allowing bots to transfer Telegram Stars from the balance of a managed business account to their own balance for withdrawal.Added the classes
aiogram.types.owned_gift_regular.OwnedGiftRegular,aiogram.types.owned_gift_unique.OwnedGiftUnique,aiogram.types.owned_gifts.OwnedGiftsand the methodaiogram.methods.get_business_account_gifts.GetBusinessAccountGifts, allowing bots to fetch the list of gifts owned by a managed business account.Added the method
aiogram.methods.convert_gift_to_stars.ConvertGiftToStars, allowing bots to convert gifts received by a managed business account to Telegram Stars.Added the method
aiogram.methods.upgrade_gift.UpgradeGift, allowing bots to upgrade regular gifts received by a managed business account to unique gifts.Added the method
aiogram.methods.transfer_gift.TransferGift, allowing bots to transfer unique gifts owned by a managed business account.Added the classes
aiogram.types.input_story_content_photo.InputStoryContentPhotoandaiogram.types.input_story_content_video.InputStoryContentVideorepresenting the content of a story to post.Added the classes
aiogram.types.story_area.StoryArea,aiogram.types.story_area_position.StoryAreaPosition,aiogram.types.location_address.LocationAddress,aiogram.types.story_area_type_location.StoryAreaTypeLocation,aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction,aiogram.types.story_area_type_link.StoryAreaTypeLink,aiogram.types.story_area_type_weather.StoryAreaTypeWeatherandaiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift, describing clickable active areas on stories.Added the methods
aiogram.methods.post_story.PostStory,aiogram.methods.edit_story.EditStoryandaiogram.methods.delete_story.DeleteStory, allowing bots to post, edit and delete stories on behalf of a managed business account.
Mini Apps
Added the field
DeviceStorage, allowing Mini Apps to use persistent local storage on the user’s device.Added the field
SecureStorage, allowing Mini Apps to use a secure local storage on the user’s device for sensitive data.
Gifts
Added the classes
aiogram.types.unique_gift_model.UniqueGiftModel,aiogram.types.unique_gift_symbol.UniqueGiftSymbol,aiogram.types.unique_gift_backdrop_colors.UniqueGiftBackdropColors, andaiogram.types.unique_gift_backdrop.UniqueGiftBackdropto describe the properties of a unique gift.Added the class
aiogram.types.unique_gift.UniqueGiftdescribing a gift that was upgraded to a unique one.Added the class
aiogram.types.accepted_gift_types.AcceptedGiftTypesdescribing the types of gifts that are accepted by a user or a chat.Replaced the field
can_send_giftwith the fieldaccepted_gift_typesof the typeaiogram.types.accepted_gift_types.AcceptedGiftTypesin the classaiogram.types.chat_full_info.ChatFullInfo.Added the class
aiogram.types.gift_info.GiftInfoand the fieldgiftto the classaiogram.types.message.Message, describing a service message about a regular gift that was sent or received.Added the class
aiogram.types.unique_gift_info.UniqueGiftInfoand the fieldunique_giftto the classaiogram.types.message.Message, describing a service message about a unique gift that was sent or received.
Telegram Premium
Added the method
aiogram.methods.gift_premium_subscription.GiftPremiumSubscription, allowing bots to gift a user a Telegram Premium subscription paid in Telegram Stars.Added the field
premium_subscription_durationto the classaiogram.types.transaction_partner_user.TransactionPartnerUser
for transactions involving a Telegram Premium subscription purchased by the bot. - Added the field
transaction_typeto the classaiogram.types.transaction_partner_user.TransactionPartnerUser, simplifying the differentiation and processing of all transaction types.General
Increased the maximum price for paid media to 10000 Telegram Stars.
Increased the maximum price for a subscription period to 10000 Telegram Stars.
Added the class
aiogram.types.paid_message_price_changed.PaidMessagePriceChangedand the fieldpaid_message_price_changedto the classaiogram.types.message.Message, describing a service message about a price change for paid messages sent to the chat.Added the field
paid_star_countto the classaiogram.types.message.Message, containing the number of Telegram Stars that were paid to send the message.
Bugfixes¶
Fix memory exhaustion in polling mode with concurrent updates.
Added a semaphore-based solution to limit the number of concurrent tasks when using
handle_as_tasks=Truein polling mode. This prevents Out of Memory (OOM) errors in memory-limited containers when there’s a large queue of updates to process. You can now control the maximum number of concurrent updates with the newtasks_concurrency_limitparameter instart_polling()andrun_polling()methods. #1658Fix empty response into webhook.
We need to return something “empty”, and “empty” form doesn’t work since it’s sending only “end” boundary w/o “start”.
An empty formdata should look smth like this for Telegram to understand:
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg --webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
But aiohttp sends only the ending boundary:
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
Such response doesn’t suit Telegram servers.
The fix replaces empty response with empty JSON response:
{}
Improved Documentation¶
Fixed broken code block formatting in
router.rstcaused by incorrect indentation of directive options. #1666
Misc¶
Bump pydantic upper bound from <2.11 to <2.12. Upgrading pydantic to version 2.11 significantly reduces resource consumption, more details on the pydantic blog post #1659
Replaced
`loop.run_in_executor`with`asyncio.to_thread`for improved readability and consistency. #1661
3.19.0 (2025-03-19)¶
Features¶
Added TypedDict definitions for middleware context data to the dispatcher dependency injection docs.
So, now you can use
aiogram.dispatcher.middleware.data.MiddlewareDatadirectly or extend it with your own data in the middlewares. #1637Added new method
aiogram.utils.deep_linking.create_startapp_link()to deep-linking module for creating “startapp” deep links. See also https://core.telegram.org/api/links#main-mini-app-links and https://core.telegram.org/api/links#direct-mini-app-links #1648, #1651
Bugfixes¶
Fixed handling of default empty string (“”) in CallbackData filter #1493
Resolved incorrect ordering of registered handlers in the
aiogram.fsm.scene.Sceneobject caused byinspect.getmembersreturning sorted members. Handlers are now registered in the order of their definition within the class, ensuring proper execution sequence, especially when handling filters with different levels of specificity.For backward compatibility, the old behavior can be restored by setting the
attrs_resolver=inspect_members_resolverparameter in theaiogram.fsm.scene.Scene:from aiogram.utils.class_attrs_resolver import inspect_members_resolver class MyScene(Scene, attrs_resolver=inspect_members_resolver):
In this case, the handlers will be registered in the order returned by
inspect.getmembers.By default, the
attrs_resolverparameter is set toget_sorted_mro_attrs_resolvernow, so you don’t need to specify it explicitly. #1641
Improved Documentation¶
Updated 🇺🇦Ukrainian docs translation #1650
Misc¶
Introduce Union types for streamlined type handling.
Implemented Union types across various modules to consolidate and simplify type annotations. This change replaces repetitive union declarations with reusable Union aliases, improving code readability and maintainability. #1592
3.18.0 (2025-02-16)¶
Features¶
Added full support for the Bot API 8.3:
Added the parameter
chat_idto the methodaiogram.methods.send_gift.SendGift, allowing bots to send gifts to channel chats.Added the field
can_send_giftto the classaiogram.types.chat_full_info.ChatFullInfo.Added the class
aiogram.types.transaction_partner_chat.TransactionPartnerChatdescribing transactions with chats.Added the fields
coverandstart_timestampto the classaiogram.types.video.Video, containing a message-specific cover and a start timestamp for the video.Added the parameters
coverandstart_timestampto the methodaiogram.methods.send_video.SendVideo, allowing bots to specify a cover and a start timestamp for the videos they send.Added the fields
coverandstart_timestampto the classesaiogram.types.input_media_video.InputMediaVideoandaiogram.types.input_paid_media_video.InputPaidMediaVideo, allowing bots to edit video covers and start timestamps, and specify them for videos in albums and paid media.Added the parameter
video_start_timestampto the methodsaiogram.methods.forward_message.ForwardMessageandaiogram.methods.copy_message.CopyMessage, allowing bots to change the start timestamp for forwarded and copied videos.Allowed adding reactions to most types of service messages.
Bugfixes¶
Improved Documentation¶
Misc¶
3.17.0 (2025-01-02)¶
Features¶
Added full support of the Bot API 8.2
Added the methods
aiogram.methods.verify_user.VerifyUser,aiogram.methods.verify_chat.VerifyChat,aiogram.methods.remove_user_verification.RemoveUserVerificationandaiogram.methods.remove_chat_verification.RemoveChatVerification, allowing bots to manage verifications on behalf of an organization.Added the field
upgrade_star_countto the classaiogram.types.gift.Gift.Added the parameter
pay_for_upgradeto the methodaiogram.methods.send_gift.SendGift.Removed the field
hide_urlfrom the classaiogram.types.inline_query_result_article.InlineQueryResultArticle. Pass an empty string asurlinstead.
3.16.0 (2024-12-21)¶
Features¶
Added full support of Bot API 8.1:
Added the field
nanostar_amountto the classaiogram.types.star_transaction.StarTransaction.Added the class
aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgramfor transactions pertaining to incoming affiliate commissions.Added the class
aiogram.types.affiliate_info.AffiliateInfoand the fieldaffiliateto the classaiogram.types.transaction_partner_user.TransactionPartnerUser, allowing bots to identify the relevant affiliate in transactions with an affiliate commission.
Bugfixes¶
Corrected the exception text of aiogram.methods.base.TelegramMethod.__await__ method. #1616
Misc¶
3.15.0 (2024-11-17)¶
Features¶
Added full support for Bot API 8.0
Added the parameter
subscription_periodto the methodaiogram.methods.create_invoice_link.CreateInvoiceLinkto support the creation of links that are billed periodically.Added the parameter
business_connection_idto the methodaiogram.methods.create_invoice_link.CreateInvoiceLinkto support the creation of invoice links on behalf of business accounts.Added the fields
subscription_expiration_date,is_recurringandis_first_recurringto the classaiogram.types.successful_payment.SuccessfulPayment.Added the method
aiogram.methods.edit_user_star_subscription.EditUserStarSubscription.Added the field
subscription_periodto the classaiogram.types.transaction_partner_user.TransactionPartnerUser.Added the method
aiogram.methods.set_user_emoji_status.SetUserEmojiStatus. The user must allow the bot to manage their emoji status.Added the class
aiogram.types.prepared_inline_message.PreparedInlineMessageand the methodaiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage, allowing bots to suggest users send a specific message from a Mini App via the methodaiogram.methods.share_message.ShareMessage.Added the classes
aiogram.types.gift.Giftandaiogram.types.gifts.Giftsand the methodaiogram.methods.get_available_gifts.GetAvailableGifts, allowing bots to get all gifts available for sending.Added the field
giftto the classaiogram.types.transaction_partner_user.TransactionPartnerUser.
3.14.0 (2024-11-02)¶
Misc¶
Checked compatibility with Python 3.13 (added to the CI/CD processes), so now aiogram is totally compatible with it.
Dropped compatibility with Python 3.8 due to this version being EOL.
Warning
In some cases you will need to have the installed compiler (Rust or C++) to install some of the dependencies to compile packages from source on pip install command.
If you are using Windows, you will need to have the Visual Studio installed.
If you are using Linux, you will need to have the build-essential package installed.
If you are using macOS, you will need to have the Xcode installed.
When developers of this dependencies will release new versions with precompiled wheels for Windows, Linux and macOS, this action will not be necessary anymore until the next version of the Python interpreter.
Added business_connection_id to the
aiogram.types.message.MessageAPI methods shortcuts.Integrated the
business_connection_idattribute into various message manipulation methods, ensuring consistent data handling. This update eliminates the need to pass thebusiness_connection_idas a parameter, instead directly accessing it from the instance attributes. #1586
Features¶
Add function
get_valueto all built-in storage implementations,FSMContextandSceneWizard#1431Enhanced the inheritance of handlers and actions in Scenes. Refactored to eliminate the copying of previously connected handlers and actions from parent scenes. Now, handlers are dynamically rebuilt based on the current class, properly utilizing class inheritance and enabling handler overrides.
That’s mean that you can now override handlers and actions in the child scene, instead of copying and duplicating them. #1583
Added full support of Bot API 7.11
Added the class
aiogram.types.copy_text_button.CopyTextButtonand the fieldcopy_textin the classaiogram.types.inline_keyboard_button.InlineKeyboardButton, allowing bots to send and receive inline buttons that copy arbitrary text.Added the parameter
allow_paid_broadcastto the methodsaiogram.methods.send_message.SendMessage,aiogram.methods.send_photo.SendPhoto,aiogram.methods.send_video.SendVideo,aiogram.methods.send_animation.SendAnimation,aiogram.methods.send_audio.SendAudio,aiogram.methods.send_document.SendDocument,aiogram.methods.send_paid_media.SendPaidMedia,aiogram.methods.send_sticker.SendSticker,aiogram.methods.send_video_note.SendVideoNote,aiogram.methods.send_voice.SendVoice,aiogram.methods.send_location.SendLocation,aiogram.methods.send_venue.SendVenue,aiogram.methods.send_contact.SendContact,aiogram.methods.send_poll.SendPoll,aiogram.methods.send_dice.SendDice,aiogram.methods.send_invoice.SendInvoice,aiogram.methods.send_game.SendGame,aiogram.methods.send_media_group.SendMediaGroupandaiogram.methods.copy_message.CopyMessage.Added the class
aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApifor transactions related to paid broadcasted messages.Introduced the ability to add media to existing text messages using the method
aiogram.methods.edit_message_media.EditMessageMedia.Added support for hashtag and cashtag entities with a specified chat username that opens a search for the relevant tag within the specified chat.
Bugfixes¶
Fix PytestDeprecationWarning thrown by pytest-asyncio when running the tests #1584
Fixed customized serialization in the
aiogram.filters.callback_data.CallbackDatafactory.From now UUID will have 32 bytes length instead of 36 bytes (with no - separators) in the callback data representation. #1602
Improved Documentation¶
Add missing closing tag for bold. #1599
3.13.1 (2024-09-18)¶
Warning
Python 3.8 End of Life: Python 3.8 will reach its end of life (EOL) soon and will no longer be supported by aiogram in the next releases (1-2 months ETA).
Please upgrade to a newer version of Python to ensure compatibility and receive future updates.
Misc¶
Bugfixes¶
Fixed Default object annotation resolution using pydantic #1579
3.13.0 (2024-09-08)¶
Features¶
Added updates about purchased paid media, represented by the class
aiogram.types.paid_media_purchased.PaidMediaPurchasedand the fieldpurchased_paid_mediain the classaiogram.types.update.Update.Added the ability to specify a payload in
aiogram.methods.send_paid_media.SendPaidMediathat is received back by the bot inaiogram.types.transaction_partner_user.TransactionPartnerUserandpurchased_paid_mediaupdates.Added the field
prize_star_countto the classesaiogram.types.giveaway_created.GiveawayCreated,aiogram.types.giveaway.Giveaway,aiogram.types.giveaway_winners.GiveawayWinnersandaiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway.Added the field
is_star_giveawayto the classaiogram.types.giveaway_completed.GiveawayCompleted.
Added missing method aliases such as .answer(), .reply(), and others to InaccessibleMessage. This change ensures consistency and improves usability by aligning the functionality of InaccessibleMessage with the Message type. #1574
Bugfixes¶
Fixed link preview options to use global defaults in various types and methods to use global defaults for link_preview_options. This change ensures consistency and enhances flexibility in handling link preview options across different components. #1543
3.12.0 (2024-08-16)¶
Features¶
Added message_thread_id parameter to message.get_url(). #1451
Added getting user from chat_boost with source ChatBoostSourcePremium in UserContextMiddleware for EventContext #1474
Added full support of Bot API 7.8
Added the ability to send paid media to any chat.
Added the parameter
business_connection_idto the methodaiogram.methods.send_paid_media.SendPaidMedia, allowing bots to send paid media on behalf of a business account.Added the field
paid_mediato the classaiogram.types.transaction_partner_user.TransactionPartnerUserfor transactions involving paid media.Added the method
aiogram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink, allowing bots to create subscription invite links.Added the method
aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink, allowing bots to edit the name of subscription invite links.Added the field
until_dateto the classaiogram.types.chat_member_member.ChatMemberMemberfor members with an active subscription.Added support for paid reactions and the class
aiogram.types.reaction_type_paid.ReactionTypePaid.
Misc¶
Improved performance of StatesGroup #1507
3.11.0 (2024-08-09)¶
Features¶
Added full support of Bot API 7.8
Added the field
has_main_web_appto the classaiogram.types.user.User, which is returned in the response toaiogram.methods.get_me.GetMe.Added the parameter
business_connection_idto the methodsaiogram.methods.pin_chat_message.PinChatMessageandaiogram.methods.unpin_chat_message.UnpinChatMessage, allowing bots to manage pinned messages on behalf of a business account.
Bugfixes¶
Fixed URL path in the “Open” button at the “demo/sendMessage” endpoint in the web_app example. #1546
Misc¶
Added method
aiogram.types.message.Message.as_reply_parameters(). Replaced usage of the argumentreply_to_message_idwithreply_parametersin all Message reply methods. #1538Added aiohttp v3.10 ` support. #1548
3.10.0 (2024-07-07)¶
Features¶
Added full support of Bot API 7.7
Added the class
aiogram.types.refunded_payment.RefundedPayment, containing information about a refunded payment.Added the field
refunded_paymentto the classaiogram.types.message.Message, describing a service message about a refunded payment.
3.9.0 (2024-07-06)¶
Features¶
Added ChatMember resolution tool and updated 2.x migration guide. #1525
Added full support of Bot API 7.6
- Added the classes
aiogram.types.paid_media.PaidMedia, aiogram.types.paid_media_info.PaidMediaInfo,aiogram.types.paid_media_preview.PaidMediaPreview,aiogram.types.paid_media_photo.PaidMediaPhotoandaiogram.types.paid_media_video.PaidMediaVideo, containing information about paid media.
- Added the classes
- Added the method
aiogram.methods.send_paid_media.SendPaidMedia and the classes
aiogram.types.input_paid_media.InputPaidMedia,aiogram.types.input_paid_media_photo.InputPaidMediaPhotoandaiogram.types.input_paid_media_video.InputPaidMediaVideo, to support sending paid media.
- Added the method
- Documented that the methods
aiogram.methods.copy_message.CopyMessage and
aiogram.methods.copy_messages.CopyMessagescannot be used to copy paid media.
- Documented that the methods
- Added the field
can_send_paid_mediato the class
- Added the field
- Added the field
paid_mediato the classes aiogram.types.message.Messageandaiogram.types.external_reply_info.ExternalReplyInfo.
- Added the field
- Added the class
aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds, containing information about Telegram Star transactions involving the Telegram Ads Platform.
- Added the field
invoice_payloadto the class aiogram.types.transaction_partner_user.TransactionPartnerUser, containing the bot-specified invoice payload.
- Added the field
Changed the default opening mode for Direct Link Mini Apps.
- Added support for launching Web Apps via t.me link in the class
Added the field
section_separator_colorto the classThemeParams.
Bugfixes¶
Fixed event context resolving for the callback query that is coming from the business account #1520
3.8.0 (2024-06-19)¶
Features¶
Added utility to safely deserialize any Telegram object or method to a JSON-compatible object (dict). (>> Read more) #1450
Added full support of Bot API 7.5
- Added the classes
aiogram.types.star_transactions.StarTransactions, aiogram.types.star_transaction.StarTransaction,aiogram.types.transaction_partner.TransactionPartnerandaiogram.types.revenue_withdrawal_state.RevenueWithdrawalState, containing information about Telegram Star transactions involving the bot.
- Added the classes
- Added the method
aiogram.methods.get_star_transactions.GetStarTransactions that can be used to get the list of all Telegram Star transactions for the bot.
- Added the method
- Added support for callback buttons in
aiogram.types.inline_keyboard_markup.InlineKeyboardMarkupfor messages sent on behalf of a business account.
- Added support for callback queries originating from a message sent
on behalf of a business account.
- Added the parameter
business_connection_idto the methods aiogram.methods.edit_message_text.EditMessageText,aiogram.methods.edit_message_media.EditMessageMedia,aiogram.methods.edit_message_caption.EditMessageCaption,aiogram.methods.edit_message_live_location.EditMessageLiveLocation,aiogram.methods.stop_message_live_location.StopMessageLiveLocationandaiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup, allowing the bot to edit business messages.
- Added the parameter
- Added the parameter
business_connection_idto the method aiogram.methods.stop_poll.StopPoll, allowing the bot to stop polls it sent on behalf of a business account.
- Added the parameter
Bugfixes¶
Increased DNS cache ttl setting to aiohttp session as a workaround for DNS resolution issues in aiohttp. #1500
Improved Documentation¶
Misc¶
[Only for contributors] Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring
If incorrect URIs provided to “–redis” and/or “–mongo” options tests should fail with errors instead of skipping. Otherwise the next scenario is possible:
developer breaks RedisStorage and/or MongoStorage code
tests are run with incorrect redis and/or mongo URIsprovided by “–redis” and “–mongo” options (for example, wrong port specified)
tests pass because skipping doesn’t fail tests run
developer or reviewer doesn’t notice that redis and/or mongo tests were skipped
broken code gets in codebase
Also some refactorings done (related with storages and storages tests). #1510
3.7.0 (2024-05-31)¶
Features¶
Added new storage
aiogram.fsm.storage.MongoStoragefor Finite State Machine based on Mongo DB (usingmotorlibrary) #1434Added full support of Bot API 7.4 #1498
Bugfixes¶
Fixed wrong
MarkdownV2custom emoji parsing inaiogram.utils.text_decorations#1496
Deprecations and Removals¶
Removed deprecated arguments from Bot class
parse_mode,disable_web_page_preview,protect_contentas previously announced in v3.4.0. #1494
Misc¶
Improved code consistency and readability in code examples by refactoring imports, adjusting the base webhook URL, modifying bot instance initialization to utilize DefaultBotProperties, and updating router message handlers. #1482
3.6.0 (2024-05-06)¶
Features¶
Added full support of Bot API 7.3 #1480
Improved Documentation¶
Added telegram objects transformation block in 2.x -> 3.x migration guide #1412
3.5.0 (2024-04-23)¶
Features¶
Bugfixes¶
WebAppUser Class Fields: Added missing is_premium, added_to_attachment_menu, and allows_write_to_pm fields to WebAppUser class to align with the Telegram API.
WebAppChat Class Implementation: Introduced the WebAppChat class with all its fields (id, type, title, username, and photo_url) as specified in the Telegram API, which was previously missing from the library.
WebAppInitData Class Fields: Included previously omitted fields in the WebAppInitData class: chat, chat_type, chat_instance, to match the official documentation for a complete Telegram Web Apps support.
Fixed poll answer FSM context by handling
voter_chatforpoll_answerevent #1436Added missing error handling to
_background_feed_update(when inhandle_in_background=Truewebhook mode) #1458
Improved Documentation¶
Added WebAppChat class to WebApp docs, updated uk_UA localisation of WebApp docs. #1433
Misc¶
Added full support of Bot API 7.2 #1444
Loosened pydantic version upper restriction from
<2.7to<2.8#1460
3.4.1 (2024-02-17)¶
Bugfixes¶
Fixed JSON serialization of the
LinkPreviewOptionsclass while it is passed as bot-wide default options. #1418
3.4.0 (2024-02-16)¶
Features¶
Reworked bot-wide globals like
parse_mode,disable_web_page_preview, and others to be more flexible.Warning
Note that the old way of setting these global bot properties is now deprecated and will be removed in the next major release.
A new enum
KeyboardButtonPollTypeTypeforKeyboardButtonPollTypeType.typefield has bed added. #1398Added full support of Bot API 7.1
Added support for the administrator rights
can_post_stories,can_edit_stories,can_delete_storiesin supergroups.Added the class
ChatBoostAddedand the fieldboost_addedto the classMessagefor service messages about a user boosting a chat.Added the field
sender_boost_countto the classMessage.Added the field
reply_to_storyto the classMessage.Added the fields
chatandidto the classStory.Added the field
unrestrict_boost_countto the classChat.Added the field
custom_emoji_sticker_set_nameto the classChat.
Bugfixes¶
Improved Documentation¶
Add notion “Working with plural forms” in documentation Utils -> Translation #1395
3.3.0 (2023-12-31)¶
Features¶
Added full support of Bot API 7.0
Reactions
Replies 2.0
Link Preview Customization
Block Quotation
Multiple Message Actions
Requests for multiple users
Chat Boosts
Giveaway
Other changes
3.2.0 (2023-11-24)¶
Features¶
Bugfixes¶
Improved Documentation¶
Corrected grammatical errors, improved sentence structures, translation for migration 2.x-3.x #1302
Minor typo correction, specifically in module naming + some grammar. #1340
Added CITATION.cff file for automatic academic citation generation. Now you can copy citation from the GitHub page and paste it into your paper. #1351
Minor typo correction in middleware docs. #1353
Misc¶
Fixed ResourceWarning in the tests, reworked
RedisEventsIsolationfixture to use Redis connection fromRedisStorage#1320Updated dependencies, bumped minimum required version:
magic-filter- fixed .resolve operationpydantic- fixed compatibility (broken in 2.4)aiodns- added new dependency to thefastextras (pip install aiogram[fast])others…
Prevent update handling task pointers from being garbage collected, backport from 2.x #1331
Updated
typing-extensionspackage version range in dependencies to fix compatibility withFastAPI#1347Introduce Python 3.12 support #1354
Speeded up CallableMixin processing by caching references to nested objects and simplifying kwargs assembly. #1357
Added
pydanticv2.5 support. #1361Updated
thumbnailfields type toInputFileonly #1372
3.1.1 (2023-09-25)¶
Bugfixes¶
Fixed pydantic version <2.4, since 2.4 has breaking changes. #1322
3.1.0 (2023-09-22)¶
Features¶
Added support for custom encoders/decoders for payload (and also for deep-linking). #1262
Added
aiogram.utils.input_media.MediaGroupBuilderfor media group construction. #1293Added full support of Bot API 6.9 #1319
Bugfixes¶
3.0.0 (2023-09-01)¶
Bugfixes¶
Replaced
datetime.datetimewith DateTime type wrapper across types to make dumped JSONs object more compatible with data that is sent by Telegram. #1277Fixed magic
.as_(...)operation for values that can be interpreted as False (e.g. 0). #1281Italic markdown from utils now uses correct decorators #1282
Fixed method
Message.send_copyfor stickers. #1284Fixed
Message.send_copymethod, which was not working properly with stories, so not you can copy stories too (forwards messages). #1286Fixed error overlapping when validation error is caused by remove_unset root validator in base types and methods. #1290
3.0.0rc2 (2023-08-18)¶
Bugfixes¶
Fixed missing message content types (
ContentType.USER_SHARED,ContentType.CHAT_SHARED) #1252Fixed nested hashtag, cashtag and email message entities not being parsed correctly when these entities are inside another entity. #1259
Moved global filters check placement into router to add chance to pass context from global filters into handlers in the same way as it possible in other places #1266
Improved Documentation¶
Added error handling example examples/error_handling.py #1099
Added a few words about skipping pending updates #1251
Added a section on Dependency Injection technology #1253
This update includes the addition of a multi-file bot example to the repository. #1254
Refactored examples code to use aiogram enumerations and enhanced chat messages with markdown beautification’s for a more user-friendly display. #1256
Supplemented “Finite State Machine” section in Migration FAQ #1264
Removed extra param in docstring of TelegramEventObserver’s filter method and fixed typo in I18n documentation. #1268
Misc¶
Enhanced the warning message in dispatcher to include a JSON dump of the update when update type is not known. #1269
Added support for Bot API 6.8 #1275
3.0.0rc1 (2023-08-06)¶
Features¶
Added Currency enum. You can use it like this:
from aiogram.enums import Currency await bot.send_invoice( ..., currency=Currency.USD, ... )
Updated keyboard builders with new methods for integrating buttons and keyboard creation more seamlessly. Added functionality to create buttons from existing markup and attach another builder. This improvement aims to make the keyboard building process more user-friendly and flexible. #1236
Added support for message_thread_id in ChatActionSender #1249
Bugfixes¶
Improved Documentation¶
Added documentation for webhook and polling modes. #1241
Misc¶
3.0.0b9 (2023-07-30)¶
Features¶
Added new shortcuts for
aiogram.types.chat_member_updated.ChatMemberUpdatedto send message to chat that member joined/left. #1234Added new shortcuts for
aiogram.types.chat_join_request.ChatJoinRequestto make easier access to sending messages to users who wants to join to chat. #1235
Bugfixes¶
Fixed bot assignment in the
Message.send_copyshortcut #1232Added model validation to remove UNSET before field validation. This change was necessary to correctly handle parse_mode where ‘UNSET’ is used as a sentinel value. Without the removal of ‘UNSET’, it would create issues when passed to model initialization from Bot.method_name. ‘UNSET’ was also added to typing. #1233
Updated pydantic to 2.1 with few bugfixes
Improved Documentation¶
Improved docs, added basic migration guide (will be expanded later) #1143
Deprecations and Removals¶
Removed the use of the context instance (Bot.get_current) from all placements that were used previously. This is to avoid the use of the context instance in the wrong place. #1230
3.0.0b8 (2023-07-17)¶
Features¶
Added possibility to use custom events in routers (If router does not support custom event it does not break and passes it to included routers). #1147
Added support for FSM in Forum topics.
The strategy can be changed in dispatcher:
from aiogram.fsm.strategy import FSMStrategy ... dispatcher = Dispatcher( fsm_strategy=FSMStrategy.USER_IN_TOPIC, storage=..., # Any persistent storage )
Note
If you have implemented you own storages you should extend record key generation with new one attribute -
thread_idImproved CallbackData serialization.
Minimized UUID (hex without dashes)
Replaced bool values with int (true=1, false=0)
Added a tool to make text formatting flexible and easy. More details on the corresponding documentation page #1172
Added
X-Telegram-Bot-Api-Secret-Tokenheader check #1173Made
allowed_updateslist to revolve automatically in start_polling method if not set explicitly. #1178Added possibility to pass custom headers to
URLInputFileobject #1191
Bugfixes¶
Change type of result in InlineQueryResult enum for
InlineQueryResultCachedMpeg4GifandInlineQueryResultMpeg4Gifto more correct according to documentation.Change regexp for entities parsing to more correct (
InlineQueryResultType.yml). #1146Fixed signature of startup/shutdown events to include the
**dispatcher.workflow_dataas the handler arguments. #1155Added missing
FORUM_TOPIC_EDITEDvalue to content_type property #1160Fixed compatibility with Python 3.8-3.9 (from previous release) #1162
Fixed the markdown spoiler parser. #1176
Fixed workflow data propagation #1196
Fixed the serialization error associated with nested subtypes like InputMedia, ChatMember, etc.
The previously generated code resulted in an invalid schema under pydantic v2, which has stricter type parsing. Hence, subtypes without the specification of all subtype unions were generating an empty object. This has been rectified now. #1213
Improved Documentation¶
Changed small grammar typos for
upload_file#1133
Deprecations and Removals¶
Removed text filter in due to is planned to remove this filter few versions ago.
Use
F.textinstead #1170
Misc¶
Added full support of Bot API 6.6
Danger
Note that this issue has breaking changes described in the Bot API changelog, this changes is not breaking in the API but breaking inside aiogram because Beta stage is not finished.
Added full support of Bot API 6.7
Warning
Note that arguments switch_pm_parameter and switch_pm_text was deprecated and should be changed to button argument as described in API docs.
Updated Pydantic to V2
Warning
Be careful, not all libraries is already updated to using V2
Added global defaults
disable_web_page_previewandprotect_contentin addition toparse_modeto the Bot instance, reworked internal request builder mechanism. #1142Removed bot parameters from storages #1144
Replaced ContextVar’s with a new feature called Validation Context in Pydantic to improve the clarity, usability, and versatility of handling the Bot instance within method shortcuts.
Danger
Breaking: The ‘bot’ argument now is required in URLInputFile
Updated magic-filter with new features
Added hint for
len(F)errorAdded not in operation
3.0.0b7 (2023-02-18)¶
Warning
Note that this version has incompatibility with Python 3.8-3.9 in case when you create an instance of Dispatcher outside of the any coroutine.
Sorry for the inconvenience, it will be fixed in the next version.
This code will not work:
dp = Dispatcher()
def main():
...
dp.run_polling(...)
main()
But if you change it like this it should works as well:
router = Router()
async def main():
dp = Dispatcher()
dp.include_router(router)
...
dp.start_polling(...)
asyncio.run(main())
Features¶
Added missing shortcuts, new enums, reworked old stuff
Breaking All previously added enums is re-generated in new place - aiogram.enums instead of aiogram.types
- Added enums:
aiogram.enums.bot_command_scope_type.BotCommandScopeType, aiogram.enums.chat_action.ChatAction,aiogram.enums.chat_member_status.ChatMemberStatus,aiogram.enums.chat_type.ChatType,aiogram.enums.content_type.ContentType,aiogram.enums.dice_emoji.DiceEmoji,aiogram.enums.inline_query_result_type.InlineQueryResultType,aiogram.enums.input_media_type.InputMediaType,aiogram.enums.mask_position_point.MaskPositionPoint,aiogram.enums.menu_button_type.MenuButtonType,aiogram.enums.message_entity_type.MessageEntityType,aiogram.enums.parse_mode.ParseMode,aiogram.enums.poll_type.PollType,aiogram.enums.sticker_type.StickerType,aiogram.enums.topic_icon_color.TopicIconColor,aiogram.enums.update_type.UpdateType,
Added shortcuts:
- Chat
aiogram.types.chat.Chat.get_administrators(), aiogram.types.chat.Chat.delete_message(),aiogram.types.chat.Chat.revoke_invite_link(),aiogram.types.chat.Chat.edit_invite_link(),aiogram.types.chat.Chat.create_invite_link(),aiogram.types.chat.Chat.export_invite_link(),aiogram.types.chat.Chat.do(),aiogram.types.chat.Chat.delete_sticker_set(),aiogram.types.chat.Chat.set_sticker_set(),aiogram.types.chat.Chat.get_member(),aiogram.types.chat.Chat.get_member_count(),aiogram.types.chat.Chat.leave(),aiogram.types.chat.Chat.unpin_all_messages(),aiogram.types.chat.Chat.unpin_message(),aiogram.types.chat.Chat.pin_message(),aiogram.types.chat.Chat.set_administrator_custom_title(),aiogram.types.chat.Chat.set_permissions(),aiogram.types.chat.Chat.promote(),aiogram.types.chat.Chat.restrict(),aiogram.types.chat.Chat.unban(),aiogram.types.chat.Chat.ban(),aiogram.types.chat.Chat.set_description(),aiogram.types.chat.Chat.set_title(),aiogram.types.chat.Chat.delete_photo(),aiogram.types.chat.Chat.set_photo(),
- Chat
- Added enums:
Added callback answer feature #1091
Added a method that allows you to compactly register routers #1117
Bugfixes¶
Check status code when downloading file #816
Fixed ignore_case parameter in
aiogram.filters.command.Commandfilter #1106
Misc¶
Added integration with new code-generator named Butcher #1069
Added full support of Bot API 6.4 #1088
Updated package metadata, moved build internals from Poetry to Hatch, added contributing guides. #1095
Added full support of Bot API 6.5
Danger
Note that
aiogram.types.chat_permissions.ChatPermissionsis updated without backward compatibility, so now this object has nocan_send_media_messagesattributeReplaced error
TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument '<name>'with a more understandable one for developers and with a link to the documentation. #1114Added possibility to reply into webhook with files #1120
Reworked graceful shutdown. Added method to stop polling. Now polling started from dispatcher can be stopped by signals gracefully without errors (on Linux and Mac). #1124
3.0.0b6 (2022-11-18)¶
Features¶
(again) Added possibility to combine filters with an and/or operations.
Read more in “Combining filters” documentation section #1018
Added following methods to
Messageclass:Message.forward(...)Message.edit_media(...)Message.edit_live_location(...)Message.stop_live_location(...)Message.pin(...)Message.unpin()
Added following methods to
Userclass:User.mention_markdown(...)User.mention_html(...)
Added full support of Bot API 6.3 #1057
Bugfixes¶
Improved Documentation¶
Misc¶
Enabled testing on Python 3.11 #1044
Added a mandatory dependency
certifiin due to in some cases on systems that doesn’t have updated ca-certificates the requests to Bot API fails with reason[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain#1066
3.0.0b5 (2022-10-02)¶
Features¶
Add PyPy support and run tests under PyPy #985
Added message text to aiogram exceptions representation #988
Added warning about using magic filter from magic_filter instead of aiogram’s ones. Is recommended to use from aiogram import F instead of from magic_filter import F #990
Added more detailed error when server response can’t be deserialized. This feature will help to debug unexpected responses from the Server #1014
Bugfixes¶
Reworked error event, introduced
aiogram.types.error_event.ErrorEventobject. #898Fixed escaping markdown in aiogram.utils.markdown module #903
Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. #995
Fixed empty mention in command parsing, now it will be None instead of an empty string #1013
Improved Documentation¶
Initialized Docs translation (added Ukrainian language) #925
Deprecations and Removals¶
Removed filters factory as described in corresponding issue. #942
Misc¶
Now Router/Dispatcher accepts only keyword arguments. #982
3.0.0b4 (2022-08-14)¶
Features¶
Add class helper ChatAction for constants that Telegram BotAPI uses in sendChatAction request. In my opinion, this will help users and will also improve compatibility with 2.x version where similar class was called “ChatActions”. #803
Added possibility to combine filters or invert result
Example:
Text(text="demo") | Command(commands=["demo"]) MyFilter() & AnotherFilter() ~StateFilter(state='my-state')
Fixed type hints for redis TTL params. #922
Added full_name shortcut for Chat object #929
Bugfixes¶
Fixed false-positive coercing of Union types in API methods #901
Added 3 missing content types:
proximity_alert_triggered
supergroup_chat_created
channel_chat_created
Fixed the ability to compare the state, now comparison to copy of the state will return True. #927
Fixed default lock kwargs in RedisEventIsolation. #972
Misc¶
Restrict including routers with strings #896
Changed CommandPatterType to CommandPatternType in aiogram/dispatcher/filters/command.py #907
Added full support of Bot API 6.1 #936
Breaking! More flat project structure
These packages was moved, imports in your code should be fixed:
aiogram.dispatcher.filters->aiogram.filtersaiogram.dispatcher.fsm->aiogram.fsmaiogram.dispatcher.handler->aiogram.handleraiogram.dispatcher.webhook->aiogram.webhookaiogram.dispatcher.flags/*->aiogram.dispatcher.flags(single module instead of package)
Removed deprecated
router.<event>_handlerandrouter.register_<event>_handlermethods. #941Deprecated filters factory. It will be removed in next Beta (3.0b5) #942
MessageEntity method get_text was removed and extract was renamed to extract_from #944
Added full support of Bot API 6.2 #975
3.0.0b3 (2022-04-19)¶
Features¶
Added possibility to get command magic result as handler argument #889
Added full support of Telegram Bot API 6.0 #890
Bugfixes¶
Misc¶
Added automated check that pull-request adds a changes description to CHANGES directory #873
Changed
Message.html_textandMessage.md_textattributes behaviour when message has no text. The empty string will be used instead of raising error. #874Used redis-py instead of aioredis package in due to this packages was merged into single one #882
Solved common naming problem with middlewares that confusing too much developers - now you can’t see the middleware and middlewares attributes at the same point because this functionality encapsulated to special interface. #883
3.0.0b2 (2022-02-19)¶
Features¶
Added possibility to pass additional arguments into the aiohttp webhook handler to use this arguments inside handlers as the same as it possible in polling mode. #785
Added possibility to add handler flags via decorator (like pytest.mark decorator but aiogram.flags) #836
Added
ChatActionSenderutility to automatically sends chat action while long process is running.It also can be used as message middleware and can be customized via
chat_actionflag. #837
Bugfixes¶
Misc¶
3.0.0b1 (2021-12-12)¶
Features¶
Added new custom operation for MagicFilter named
as_Now you can use it to get magic filter result as handler argument
from aiogram import F ... @router.message(F.text.regexp(r"^(\d+)$").as_("digits")) async def any_digits_handler(message: Message, digits: Match[str]): await message.answer(html.quote(str(digits))) @router.message(F.photo[-1].as_("photo")) async def download_photos_handler(message: Message, photo: PhotoSize, bot: Bot): content = await bot.download(photo)
Bugfixes¶
Fixed: Missing
ChatMemberHandlerimport inaiogram/dispatcher/handler#751
Misc¶
Check
destinyin case of nowith_destinyenabled in RedisStorage key builder #776Added full support of Bot API 5.5 #777
Stop using feature from #336. From now settings of client-session should be placed as initializer arguments instead of changing instance attributes. #778
Make TelegramAPIServer files wrapper in local mode bi-directional (server-client, client-server) Now you can convert local path to server path and server path to local path. #779
3.0.0a18 (2021-11-10)¶
Features¶
Breaking: Changed the signature of the session middlewares Breaking: Renamed AiohttpSession.make_request method parameter from call to method to match the naming in the base class Added middleware for logging outgoing requests #716
Improved description of filters resolving error. For example when you try to pass wrong type of argument to the filter but don’t know why filter is not resolved now you can get error like this:
aiogram.exceptions.FiltersResolveError: Unknown keyword filters: {'content_types'} Possible cases: - 1 validation error for ContentTypesFilter content_types Invalid content types {'42'} is not allowed here (type=value_error)
Breaking internal API change Reworked FSM Storage record keys propagation #723
Implemented new filter named
MagicData(magic_data)that helps to filter event by data from middlewares or other filtersFor example your bot is running with argument named
configthat contains the application config then you can filter event by value from this config:@router.message(magic_data=F.event.from_user.id == F.config.admin_id) ...
Bugfixes¶
Misc¶
Enabled testing on Python 3.10 Removed async_lru dependency (is incompatible with Python 3.10) and replaced usage with protected property #719
Converted README.md to README.rst and use it as base file for docs #725
Rework filters resolving:
Automatically apply Bound Filters with default values to handlers
Fix data transfer from parent to included routers filters
Added full support of Bot API 5.4 https://core.telegram.org/bots/api-changelog#november-5-2021 #744
3.0.0a17 (2021-09-24)¶
Misc¶
3.0.0a16 (2021-09-22)¶
Features¶
Misc¶
Covered by tests and docs KeyboardBuilder util #699
Breaking!!!. Refactored and renamed exceptions.
Exceptions module was moved from
aiogram.utils.exceptionstoaiogram.exceptionsAdded prefix Telegram for all error classes
Replaced all
pragma: no covermarks via global.coveragercconfig #702Updated dependencies.
Breaking for framework developers Now all optional dependencies should be installed as extra: poetry install -E fast -E redis -E proxy -E i18n -E docs #703
3.0.0a15 (2021-09-10)¶
Features¶
Ability to iterate over all states in StatesGroup. Aiogram already had in check for states group so this is relative feature. #666
Bugfixes¶
Fixed incorrect type checking in the
aiogram.utils.keyboard.KeyboardBuilder#674
Misc¶
3.0.0a14 (2021-08-17)¶
Features¶
Bugfixes¶
Prepare parse mode for InputMessageContent in AnswerInlineQuery method #660
Improved Documentation¶
Added integration with
towncrier#602
Misc¶
2.14.3 (2021-07-21)¶
2.14.2 (2021-07-26)¶
2.14 (2021-07-27)¶
Fixed
Message.send_copymethod for polls (#603)Updated pattern for
GroupDeactivatedexception (#549Added
caption_entitiesfield inInputMediabase class (#583)Fixed HTML text decorations for tag
pre(#597 fixes issues #596 and #481)Fixed
Message.get_full_commandmethod for messages with caption (#576)Improved
MongoStorage: remove documents with empty data fromaiogram_datacollection to save memory. (#609)
2.13 (2021-04-28)¶
Added full support of Bot API 5.2 (#572)
Fixed usage of
provider_dataargument insendInvoicemethod callAllowed to use State instances FSM storage directly (#542)
Added possibility to get i18n locale without User instance (#546)
Fixed returning type of
Bot.*_chat_invite_link()methods #548 (#549)Fixed deep-linking util (#569)
Small changes in documentation - describe limits in docstrings corresponding to the current limit. (#565)
Fixed internal call to deprecated ‘is_private’ method (#553)
Added possibility to use
allowed_updatesargument in Polling mode (#564)
2.12.1 (2021-03-22)¶
Fixed
TypeError: Value should be instance of 'User' not 'NoneType'(#527)Added missing
Chat.message_auto_delete_timefield (#535)Added
MediaGroupfilter (#528)Added
Chat.delete_messageshortcut (#526)Added mime types parsing for
aiogram.types.Document(#431)Added warning in
TelegramObject.__setitem__when Telegram adds a new field (#532)Fixed
examples/chat_type_filter.py(#533)Removed redundant definitions in framework code (#531)
2.12 (2021-03-14)¶
Full support for Telegram Bot API 5.1 (#519)
Fixed sending playlist of audio files and documents (#465, #468)
Fixed
FSMContextProxy.setdefaultmethod (#491)Fixed
Message.answer_locationandMessage.reply_locationunable to send live location (#497)Fixed
user_idandchat_idgetters from the context at Dispatchercheck_key,release_keyandthrottlemethods (#520)Fixed
Chat.update_chatmethod and all similar situations (#516)Fixed
MediaGroupattach methods (#514)Fixed state filter for inline keyboard query callback in groups (#508, #510)
Added missing
ContentTypes.DICE(#466)Added missing vcard argument to
InputContactMessageContentconstructor (#473)Add missing exceptions:
MessageIdInvalid,CantRestrictChatOwnerandUserIsAnAdministratorOfTheChat(#474, #512)Added
answer_chat_actionto theMessageobject (#501)Added dice to
message.send_copymethod (#511)Removed deprecation warning from
Message.send_copyAdded an example of integration between externally created aiohttp Application and aiogram (#433)
Added
split_separatorargument tosafe_split_text(#515)Fixed some typos in docs and examples (#489, #490, #498, #504, #514)
2.11.2 (2021-11-10)¶
Fixed default parse mode
Added missing “supports_streaming” argument to answer_video method #462
2.11.1 (2021-11-10)¶
2.11 (2021-11-08)¶
Added full support of Telegram Bot API 5.0 (#454)
- Added possibility to more easy specify custom API Server (example)
WARNING: API method
closewas named in Bot class as close_bot in due to Bot instance already has method with the same name. It will be changed inaiogram 3.0
Added alias to Message object
Message.copy_towith deprecation ofMessage.send_copyChatType.SUPER_GROUPrenamed toChatType.SUPERGROUP(#438)
2.10.1 (2021-09-14)¶
Fixed critical bug with getting asyncio event loop in executor. (#424)
AttributeError: 'NoneType' object has no attribute 'run_until_complete'
2.10 (2021-09-13)¶
Breaking change: Stop using _MainThread event loop in bot/dispatcher instances (#397)
Fixed: TelegramObject’s aren’t destroyed after update handling #307 (#371)
Add setting current context of Telegram types (#369)
Fixed markdown escaping issues (#363)
Fixed HTML characters escaping (#409)
Fixed italic and underline decorations when parse entities to Markdown
Added missing thumb parameter (#362)
Added public methods to register filters and middlewares (#370)
Added ChatType builtin filter (#356)
Fixed IDFilter checking message from channel (#376)
Added missed answer_poll and reply_poll (#384)
Added possibility to ignore message caption in commands filter (#383)
Fixed addStickerToSet method
Added preparing thumb in send_document method (#391)
Added exception MessageToPinNotFound (#404)
Fixed handlers parameter-spec solving (#408)
Fixed CallbackQuery.answer() returns nothing (#420)
CHOSEN_INLINE_RESULT is a correct API-term (#415)
Fixed missing attributes for Animation class (#422)
Added missed emoji argument to reply_dice (#395)
Added is_chat_creator method to ChatMemberStatus (#394)
Added missed ChatPermissions to __all__ (#393)
Added is_forward method to Message (#390)
Fixed usage of deprecated is_private function (#421)
and many others documentation and examples changes:
Updated docstring of RedisStorage2 (#423)
Updated I18n example (added docs and fixed typos) (#419)
A little documentation revision (#381)
Added comments about correct errors_handlers usage (#398)
Fixed typo rexex -> regex (#386)
Fixed docs Quick start page code blocks (#417)
fixed type hints of callback_data (#400)
Prettify readme, update downloads stats badge (#406)
2.9.2 (2021-06-13)¶
2.9 (2021-06-08)¶
Added full support of Telegram Bot API 4.9
Fixed user context at poll_answer update (#322)
Fix Chat.set_description (#325)
Add lazy session generator (#326)
Fix missing
InlineQueryResultPhotoparse_modefield (#331)Fix fields from parent object in
KeyboardButton(#344 fixes #343)Add possibility to get bot id without calling
get_me(#296)
2.8 (2021-04-26)¶
Added full support of Bot API 4.8
Added
Message.answer_diceandMessage.reply_dicemethods (#306)
2.7 (2021-04-07)¶
2.6.1 (2021-01-25)¶
2.6 (2021-01-23)¶
2.5.3 (2021-01-05)¶
2.5.2 (2021-01-01)¶
Get back
quote_htmlandescape_mdfunctions
2.5.1 (2021-01-01)¶
Hot-fix of
CommandStartfilter
2.5 (2021-01-01)¶
#239 Fixed
check_tokenmethod#248 Fixed support of aiohttp-socks
Updated setup.py. No more use of internal pip API
Updated links to documentations (https://docs.aiogram.dev)
Other small changes and minor improvements (#223 and others…)
2.4 (2021-10-29)¶
Added Message.send_copy method (forward message without forwarding)
Safe close of aiohttp client session (no more exception when application is shutdown)
No more “adWanced” words in project #209
Arguments user and chat is renamed to user_id and chat_id in Dispatcher.throttle method #196
Fixed set_chat_permissions #198
Fixed Dispatcher polling task does not process cancellation #199, #201
Fixed compatibility with latest asyncio version #200
Disabled caching by default for lazy_gettext method of I18nMiddleware #203
Fixed HTML user mention parser #205
Added IsReplyFilter #210
Fixed send_poll method arguments #211
Added OrderedHelper #215
Fix incorrect completion order. #217
2.3 (2021-08-16)¶
Full support of Telegram Bot API 4.4
Fixed #143
Added expire argument to RedisStorage2 and other storage fixes #145
Fixed JSON and Pickle storages #138
Implemented MongoStorage #153 based on aiomongo (soon motor will be also added)
Improved tests
Updated examples
Warning: Updated auth widget util. #190
Implemented throttle decorator #181
2.2 (2021-06-09)¶
2.1 (2021-04-18)¶
Implemented all new features from Telegram Bot API 4.2
is_memberandis_adminmethods ofChatMemberandChatMemberStatuswas renamed tois_chat_memberandis_chat_adminRemover func filter
Added some useful Message edit functions (
Message.edit_caption,Message.edit_media,Message.edit_reply_markup) (#121, #103, #104, #112)Added requests timeout for all methods (#110)
Added
answer*methods toMessageobject (#112)Maked some improvements of
CallbackDatafactoryAdded deep-linking parameter filter to
CommandStartfilterImplemented logging filter for extending LogRecord attributes (Will be usefull with external logs collector utils like GrayLog, Kibana and etc.)
Updated
requirements.txtanddev_requirements.txtfilesOther small changes and minor improvements
2.0.1 (2021-12-31)¶
2.0 (2021-10-28)¶
This update will break backward compability with Python 3.6 and works only with Python 3.7+: - contextvars (PEP-567); - New syntax for annotations (PEP-563).
Changes:
- Used contextvars instead of aiogram.utils.context;
- Implemented filters factory;
- Implemented new filters mechanism;
- Allowed to customize command prefix in CommandsFilter;
- Implemented mechanism of passing results from filters (as dicts) as kwargs in handlers (like fixtures in pytest);
- Implemented states group feature;
- Implemented FSM storage’s proxy;
- Changed files uploading mechanism;
- Implemented pipe for uploading files from URL;
- Implemented I18n Middleware;
- Errors handlers now should accept only two arguments (current update and exception);
- Used aiohttp_socks instead of aiosocksy for Socks4/5 proxy;
- types.ContentType was divided to types.ContentType and types.ContentTypes;
- Allowed to use rapidjson instead of ujson/json;
- .current() method in bot and dispatcher objects was renamed to get_current();
Full changelog - You can read more details about this release in migration FAQ: https://aiogram.readthedocs.io/en/latest/migration_1_to_2.html
1.4 (2021-08-03)¶
Bot API 4.0 (#57)
1.3.3 (2021-07-16)¶
Fixed markup-entities parsing;
Added more API exceptions;
Now InlineQueryResultLocation has live_period;
Added more message content types;
Other small changes and minor improvements.
1.3.2 (2021-05-27)¶
Fixed crashing of polling process. (i think)
Added parse_mode field into input query results according to Bot API Docs.
Warning: disabled connections limit for bot aiohttp session.
Warning: Destroyed “temp sessions” mechanism.
Added new error types.
Refactored detection of error type.
Small fixes of executor util.
Fixed RethinkDBStorage
1.3.1 (2018-05-27)¶
1.3 (2021-04-22)¶
Allow to use Socks5 proxy (need manually install
aiosocksy).Refactored
aiogram.utils.executormodule.[Warning] Updated requirements list.
1.2.3 (2018-04-14)¶
Fixed API errors detection
Fixed compability of
setup.pywith pip 10.0.0
1.2.2 (2018-04-08)¶
Added more error types.
Implemented method
InputFile.from_url(url: str)for downloading files.Implemented big part of API method tests.
Other small changes and mminor improvements.
1.2.1 (2018-03-25)¶
1.2 (2018-02-23)¶
Full provide Telegram Bot API 3.6
Fixed critical error:
Fatal Python error: PyImport_GetModuleDict: no module dictionary!Implemented connection pool in RethinkDB driver
Typo fixes of documentstion
Other bug fixes and minor improvements.
1.1 (2018-01-27)¶
Added more methods for data types (like
message.reply_sticker(...)orfile.download(...)Typo fixes of documentstion
Allow to set default parse mode for messages (
Bot( ... , parse_mode='HTML'))Allowed to cancel event from the
Middleware.on_pre_process_<event type>Fixed sending files with correct names.
Fixed MediaGroup
Added RethinkDB storage for FSM (
aiogram.contrib.fsm_storage.rethinkdb)
1.0.4 (2018-01-10)¶
1.0.3 (2018-01-07)¶
Added middlewares mechanism.
Added example for middlewares and throttling manager.
Added logging middleware (
aiogram.contrib.middlewares.logging.LoggingMiddleware)Fixed handling errors in async tasks (marked as ‘async_task’)
Small fixes and other minor improvements.
1.0.2 (2017-11-29)¶
1.0.1 (2017-11-21)¶
Implemented
types.InputFilefor more easy sending local filesDanger! Fixed typo in word pooling. Now whatever all methods with that word marked as deprecated and original methods is renamed to polling. Check it in you’r code before updating!
Fixed helper for chat actions (
types.ChatActions)Added example for media group.
1.0 (2017-11-19)¶
Remaked data types serialozation/deserialization mechanism (Speed up).
Fully rewrited all Telegram data types.
Bot object was fully rewritted (regenerated).
Full provide Telegram Bot API 3.4+ (with sendMediaGroup)
Warning: Now
BaseStorage.close()is awaitable! (FSM)Fixed compability with uvloop.
More employments for
aiogram.utils.context.Allowed to disable
ujson.Other bug fixes and minor improvements.
Migrated from Bitbucket to Github.