Skip to content

Releases: teloxide-fork/teloxide

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 15:21

Changed

  • MessageFilterExt::filter_reply_to_message now inserts teloxide::dispatching::ReplyToMessage into the dependency map instead of a bare Message, so it no longer overrides the original Message (#751) [BC]

Added

  • Added support for Telegram Bot API 10.3
    • Rich-message buttons and blocks, ephemeral message parameters, generation updates, reply markup, permissions, and community/gift fields
    • Update::filter_stopped_message_generation and its dispatcher allowed-update hint
    • receiver_user_id/callback_query_id send-method parameters were replaced by ephemeral_message_parameters [BC]
    • See its changelog for more information
  • Added support for Telegram Bot API 10.2 [BC]
    • Rich-message input, ephemeral messages, communities, and subscription updates
    • See its changelog for more information
  • Added support for Telegram Bot API 10.1 [BC]
  • Added support for Telegram Bot API 10.0
  • Added support for Telegram Bot API 9.6
  • Added support for Telegram Bot API 9.5
  • Support for TBA 9.4, see its changelog for more information
  • Support for TBA 9.3, see its changelog for more information [BC]
  • MessageToEditHasNoText variant to ApiError (#1426)
  • ParticipantIdInvalid and ChatAdminRequired variants to ApiError (#1349)
  • Support for TBA 9.2 (#1403)
    • Add filter_suggested_post_approved, filter_suggested_post_approval_failed, filter_suggested_post_declined, filter_suggested_post_paid, filter_suggested_post_refunded filters to the MessageFilterExt trait
    • ChatFullInfoPublicKind::Supergroup is now of type Box<ChatFullInfoPublicSupergroup> instead of ChatFullInfoPublicSupergroup [BC]

Fixed

  • Make sure postgres-storage-rustls feature actually enables rustls-based postgres storage (#1400)

  • Escape @ mentions in markdown::user_mention_or_link (#1411)

  • Add local TBA file downloading support in crate::net::download (#1173)

  • Added schema and rust types checking (#1396) [BC]

    • delete_chat_photo method now returns True, not String
    • upload_sticker_file method now returns File instead of FileMeta
    • photo_size, photo_width and photo_height parameters of create_invoice_link method now are of type u32, not String
    • get_game_high_scores method now returns Vec<GameHighScore>, not True
    • BusinessMessagesDeleted struct now has correct deserialization of message_ids field
    • accent_color_id field of ChatFullInfo struct now is of type u8, not Option<u8>
    • EncryptedPassportElement and EncryptedPassportElementKind structs now deserialize correctly
    • photo field of PaidMediaPhoto struct now is of type Vec<PhotoSize>, not PhotoSize
    • premium_animation field of StickerKind::Regular enum variant is now of type Option<File>, not Option<FileMeta>
    • users field of VideoChatParticipantsInvited struct now is of type Vec<User>, not Option<Vec<User>>
  • Don't ignore argument separator in CommandEnum and both separators in Command (#1462)

    • Now it's possible to specify separator in each command variant
    • Usage of command_separator in a command variant now leads to a compile time error instead of silent ignoring
    • Now usage of separator without parse_with = "split" both in the command enum and in the command variant gives a compile time error

Changed

  • MSRV (Minimal Supported Rust Version) was bumped from 1.85 to 1.88 [BC]
  • Some dependencies were bumped: derive_more to 2.0.1, deadpool-redis to 0.22.0 (#1408)

macros-v0.11.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 15:21

Fixed

  • Don't ignore argument separator in CommandEnum and both separators in Command (#1462)
    • Now it's possible to specify separator in each command variant
    • Usage of command_separator in a command variant now leads to a compile time error instead of silent ignoring
    • Now usage of separator without parse_with = "split" both in the command enum and in the command variant gives a compile time error

core-v0.14.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 15:21

Added

  • Support for TBA 10.3
    • Rich-message buttons, expandable quotations, document blocks, and compact tables
    • EphemeralMessageParameters, message-generation-stopped updates and AllowedUpdate::StoppedMessageGeneration, reply-markup fields, welcome-message permissions, and community/gift fields
    • Send-method receiver_user_id/callback_query_id parameters were replaced by ephemeral_message_parameters [BC]
    • edit_ephemeral_message_text's text parameter is now optional (an alternative to the new rich_message parameter) [BC]
    • EditEphemeralMessageText no longer derives PartialEq/Eq/Hash, since its rich_message: InputRichMessage parameter can carry structured content [BC]
  • Support for TBA 10.2
    • Rich-message input: InputRichBlock type tree, InputRichMessageMedia, InputMediaVoiceNote, and InputRichMessage::blocks/media fields
    • Ephemeral messages: receiver_user_id/callback_query_id send parameters, edit_ephemeral_message_text/_media/_caption/_reply_markup and delete_ephemeral_message methods, BotCommand::is_ephemeral, Message::receiver_user/ephemeral_message_id, and ReplyParameters::ephemeral_message_id
    • Communities: Community, CommunityChatAdded, CommunityChatRemoved, and ChatFullInfo::community
    • Subscriptions: BotSubscriptionUpdated and Update's subscription variant
    • ReplyParameters::message_id is now optional (an alternative to the new ephemeral_message_id field) [BC]
    • EditMessageText, EditMessageTextInline, SendRichMessage, and SendRichMessageDraft no longer derive PartialEq/Eq/Hash, since their rich_message: InputRichMessage parameter can now carry structured blocks/media content [BC]
    • InputRichMessage and InputMessageContentRichMessage no longer derive Eq/Hash (both still derive PartialEq), for the same reason [BC]
  • Support for TBA 10.1
    • Join request queries: User::supports_join_request_queries, ChatFullInfo::guard_bot, ChatJoinRequest::query_id, answer_chat_join_request_query and send_chat_join_request_web_app methods
    • Polls: Link and InputMediaLink structs, and link field to PollMedia struct
    • Rich messages: RichText/RichBlock type trees, RichMessage struct, InputRichMessage struct, send_rich_message and send_rich_message_draft methods, and Message::rich_message() accessor
    • text parameter of edit_message_text/edit_message_text_inline is now optional (an alternative to the new rich_message parameter) [BC]
  • Support for TBA 10.0
    • Guest mode: guest message updates and answer_guest_query
    • Message-reaction management and the can_react_to_messages permission
    • Poll media, members-only polls, country restrictions, and explanation media
    • Live photos in messages and supported media inputs, plus send_live_photo
    • Managed-bot access settings and their associated methods
    • get_user_personal_chat_messages for retrieving personal-chat messages
  • Support for TBA 9.6
    • Managed bots: get_managed_bot_token, replace_managed_bot_token, save_prepared_keyboard_button, KeyboardButtonRequestManagedBot, ManagedBotCreated, ManagedBotUpdated, and User::can_manage_bots
    • Poll::correct_option_id was replaced with Poll::correct_option_ids (Vec<u8>) [BC]
    • SendPoll::correct_option_id was replaced with SendPoll::correct_option_ids [BC]
    • Poll revoting, shuffled and addable options, delayed results, descriptions, persistent poll option metadata, persistent poll answer IDs, and poll-option reply parameters
    • Message::reply_to_poll_option_id, MessageKind::PollOptionAdded, MessageKind::PollOptionDeleted, MessageKind::ManagedBotCreated, and UpdateKind::ManagedBot
  • set_chat_member_tag method
  • MessageEntityKind::DateTime variant
  • sender_tag field to Message
  • tag field to ChatMemberKind::Member and ChatMemberKind::Restricted
  • can_edit_tag field to ChatMemberKind::Restricted
  • EDIT_TAG flag (and can_edit_tag() accessor) to ChatPermissions
  • can_manage_tags field to ChatAdministratorRights and ChatMemberKind::Administrator
  • can_manage_tags parameter to promote_chat_member
  • Support for TBA 9.4
    • Add allows_users_to_create_topics field to User struct
    • Add icon_custom_emoji_id and style fields to KeyboardButton and InlineKeyboardButton structs
    • Add ButtonStyle enum
    • Add ChatOwnerLeft struct, and chat_owner_left field to Message struct
    • Add ChatOwnerChanged struct, and chat_owner_changed field to Message struct
    • Add set_my_profile_photo and remove_my_profile_photo methods
    • Add VideoQuality struct, and qualities field to Video struct
    • Add first_profile_audio field to ChatFullInfo struct
    • Add UserProfileAudios struct, and get_user_profile_audios method
    • Add rarity field to UniqueGiftModel struct
    • Add is_burned field to UniqueGift struct
  • Support for TBA 9.3
    • Add has_topics_enabled field to User struct
    • Add send_message_draft method
    • Add is_name_implicit field to ForumTopic and ForumTopicCreated structs
    • Add get_user_gifts and get_chat_gifts methods
    • Add GiftedUpgrade and Offer variants to UniqueGiftOrigin enum
    • Replace last_resale_star_count field with last_resale_currency and last_resale_amount fields on UniqueGiftInfo struct [BC]
    • Add gift_upgrade_sent field to Message struct
    • Add UniqueGiftColors struct, and colors field to UniqueGift struct
    • Add GiftBackground struct, and background field to Gift struct
    • Add UserRating struct, and rating field to ChatFullInfo struct
    • Add completed_by_chat field to ChecklistTask struct
    • Add paid_message_star_count and unique_gift_colors fields to ChatFullInfo struct
    • Add message_effect_id parameter to forward_message and copy_message methods
    • Add gift_id (now required), is_from_blockchain, is_premium fields to UniqueGift struct [BC: gift_id changed from absent to required]
    • Add personal_total_count, personal_remaining_count, is_premium, has_colors, background, unique_gift_variant_count fields to Gift struct
    • Add is_upgrade_separate and unique_gift_number fields to GiftInfo and OwnedGiftRegular structs
    • Add gifts_from_channels field to AcceptedGiftTypes struct
    • Add repost_story method
    • Replace exclude_limited parameter with exclude_limited_upgradable and exclude_limited_non_upgradable parameters, and add exclude_from_blockchain parameter to get_business_account_gifts method [BC]
  • Support for TBA 9.2 (#1403)
    • Add checklist_task_id field to ReplyParameters struct
    • Add reply_to_checklist_task_id field to Message struct
    • Add publisher_chat field to Gift and UniqueGift structs
    • Add is_direct_messages field to PublicChatSupergroup and ChatFullInfoPublicSupergroup structs
    • Add parent_chat field to ChatFullInfoPublicSupergroup struct
    • Add DirectMessagesTopic and TopicId structs, and added field direct_messages_topic to Message struct
    • Add direct_messages_topic_id parameter to send_message, send_photo, send_video, send_animation, send_audio, send_document, send_paid_media, send_sticker, send_video_note, send_voice, send_location, send_venue, send_contact, send_dice, send_invoice, send_media_group, copy_message, copy_messages, forward_message and forward_messages methods
    • Add SuggestedPostParameters struct and suggested_post_parameters parameter to send_message, send_photo, send_video, send_animation, send_audio, send_document, send_paid_media, send_sticker, send_video_note, send_voice, send_location, send_venue, send_contact, send_dice, send_invoice, copy_message and forward_message methods
    • Add message_thread_id parameter to send_paid_media method
    • Add approve_suggested_post and decline_suggested_post methods
    • Add can_manage_direct_messages field to Administrator and ChatAdministratorRights structs
    • Add can_manage_direct_messages parameter to promote_chat_member method
    • Add is_paid_post field to Message struct
    • Add suggested_post_info field to Message struct
    • Add suggested_post_approved, suggested_post_approval_failed, suggested_post_declined, suggested_post_paid and suggested_post_refunded service messages

Changed

  • MSRV (Minimal Supported Rust Version) was bumped from 1.85 to 1.88 [BC]
  • takecell is now pinned to =0.1.1 so that downstream users don't resolve a newer version with a higher MSRV (#1478)
  • Throttle now also throttles create_forum_topic, edit_forum_topic, delete_forum_topic, pin_chat_message, edit_message_text, edit_message_caption, edit_message_media, delete_message and delete_messages (these now return ThrottlingRequests and require Clone + Send + Sync + 'static payload bounds on the inner requester) [BC]
  • send_message_draft is no longer restricted to privileged bots (TBA 9.5)
  • Support for TBA 9.2 (#1403)
    • ChatFullInfoPublicKind::Supergroup is now of type Box<ChatFullInfoPublicSupergroup> instead of ChatFullInfoPublicSupergroup [BC]

Fixed

  • send_media_group no longer accepts animations or voice notes at compile time: SendMediaGroup::media (and Requester::send_media_group) now take InputGroupMedia (audio, document, live photo, photo, video) instead of InputMedia; use .into() on a concrete InputMedia* type or InputGroupMedia::try_from(InputMedia) (#1121) [BC]

  • ApiError::CantInitiateConversation is now parsed from the `Forbidden: b...

Read more