diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5255d..726d5ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.1.0 (2024-02-19) + +- support API v7.1 + ## v1.0.1 (2024-01-15) - fix: add 'omitempty' to LinkPreviewOptions.URL diff --git a/README.md b/README.md index be3d67b..ef2c079 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ > [Telegram Group](https://t.me/gotelegrambotui) -> Supports Bot API version: [7.0](https://core.telegram.org/bots/api#december-29-2023) from December 29, 2023 +> Supports Bot API version: [7.1](https://core.telegram.org/bots/api#february-16-2024) from February 16, 2024 It's a Go zero-dependencies telegram bot framework diff --git a/models/boost.go b/models/boost.go index b37b6e5..b8f2c84 100644 --- a/models/boost.go +++ b/models/boost.go @@ -5,6 +5,11 @@ import ( "fmt" ) +// ChatBoostAdded https://core.telegram.org/bots/api#chatboostadded +type ChatBoostAdded struct { + BoostCount int `json:"boost_count"` +} + // ChatBoostUpdated https://core.telegram.org/bots/api#chatboostupdated type ChatBoostUpdated struct { Chat Chat `json:"chat"` diff --git a/models/chat.go b/models/chat.go index 958588e..a32e197 100644 --- a/models/chat.go +++ b/models/chat.go @@ -102,6 +102,7 @@ type Chat struct { PinnedMessage *Message `json:"pinned_message,omitempty"` Permissions *ChatPermissions `json:"permissions,omitempty"` SlowModeDelay int `json:"slow_mode_delay,omitempty"` + UnrestrictBoostCount int `json:"unrestrict_boost_count,omitempty"` MessageAutoDeleteTime int `json:"message_auto_delete_time,omitempty"` HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled,omitempty"` HasHiddenMembers bool `json:"has_hidden_members,omitempty"` @@ -109,6 +110,7 @@ type Chat struct { HasVisibleHistory bool `json:"has_visible_history,omitempty"` StickerSetName string `json:"sticker_set_name,omitempty"` CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"` + CustomEmojiStickerSetName string `json:"custom_emoji_sticker_set_name,omitempty"` LinkedChatID int64 `json:"linked_chat_id,omitempty"` Location *ChatLocation `json:"location,omitempty"` } diff --git a/models/message.go b/models/message.go index ee61a7f..7bc854b 100644 --- a/models/message.go +++ b/models/message.go @@ -62,6 +62,7 @@ type Message struct { MessageThreadID int `json:"message_thread_id,omitempty"` From *User `json:"from,omitempty"` SenderChat *Chat `json:"sender_chat,omitempty"` + SenderBoostCount int `json:"sender_boost_count,omitempty"` Date int `json:"date"` Chat Chat `json:"chat"` ForwardOrigin *MessageOrigin `json:"forward_origin,omitempty"` @@ -70,6 +71,7 @@ type Message struct { ReplyToMessage *Message `json:"reply_to_message,omitempty"` ExternalReply *ExternalReplyInfo `json:"external_reply,omitempty"` Quote *TextQuote `json:"quote,omitempty"` + ReplyToStore *Story `json:"reply_to_store,omitempty"` ViaBot *User `json:"via_bot,omitempty"` EditDate int `json:"edit_date,omitempty"` HasProtectedContent bool `json:"has_protected_content,omitempty"` @@ -116,6 +118,7 @@ type Message struct { WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"` PassportData *PassportData `json:"passport_data,omitempty"` ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` + BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"` ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"` ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"` ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"` diff --git a/models/story.go b/models/story.go index 551f1e8..812081e 100644 --- a/models/story.go +++ b/models/story.go @@ -1,3 +1,6 @@ package models -type Story struct{} +type Story struct { + Chat Chat `json:"chat"` + ID int `json:"id"` +}