all repos — telegram-bot-api @ f3a5b4ed79f60d503c3ae13843e17b51c1361dc5

Golang bindings for the Telegram Bot API

Merge pull request #21 from OvyFlash/bot-api-7.1

BOT API 7.1 implementation
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Sat, 27 Apr 2024 15:17:35 +0300
commit

f3a5b4ed79f60d503c3ae13843e17b51c1361dc5

parent

def9b6b5dc127f34b065db302ba536e22fa4f134

1 files changed, 37 insertions(+), 1 deletions(-)

jump to
M types.gotypes.go

@@ -384,6 +384,12 @@ // getChat.

// // optional SlowModeDelay int `json:"slow_mode_delay,omitempty"` + // UnrestrictBoostCount is for supergroups, the minimum number of boosts that + // a non-administrator user needs to add in order to + // ignore slow mode and chat permissions. Returned only in getChat. + // + // optional + UnrestrictBoostCount int `json:"unrestrict_boost_count,omitempty"` // MessageAutoDeleteTime is the time after which all messages sent to the // chat will be automatically deleted; in seconds. Returned only in getChat. //

@@ -420,6 +426,12 @@ // Returned only in getChat.

// // optional CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"` + // CustomEmojiStickerSetName is for supergroups, the name of the group's + // custom emoji sticker set. Custom emoji from this set can be used by all + // users and bots in the group. Returned only in getChat. + // + // optional + CustomEmojiStickerSetName string `json:"custom_emoji_sticker_set_name,omitempty"` // LinkedChatID is a unique identifier for the linked chat, i.e. the // discussion group identifier for a channel and vice versa; for supergroups // and channel chats.

@@ -488,6 +500,11 @@ // automatically forwarded to the discussion group

// // optional SenderChat *Chat `json:"sender_chat,omitempty"` + // SenderBoostCount is the number of boosts added by the user, + // if the sender of the message boosted the chat + // + // optional + SenderBoostCount int `json:"sender_boost_count,omitempty"` // Date of the message was sent in Unix time Date int `json:"date"` // Chat is the conversation the message belongs to

@@ -520,6 +537,10 @@ // Quote for replies that quote part of the original message, the quoted part of the message

// // optional Quote *TextQuote `json:"text_quote,omitempty"` + // ReplyToStory for replies to a story, the original story + // + // ReplyToStory + ReplyToStory *Story `json:"reply_to_story"` // ViaBot through which the message was sent; // // optional

@@ -739,6 +760,10 @@ // triggered another user's proximity alert while sharing Live Location

// // optional ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` + // BoostAdded is a service message: user boosted the chat + // + // optional + BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"` // ForumTopicCreated is a service message: forum topic created // // optional

@@ -1318,7 +1343,12 @@ FileSize int64 `json:"file_size,omitempty"`

} // Story represents a message about a forwarded story in the chat. -type Story struct{} +type Story struct { + // Chat that posted the story + Chat Chat `json:"chat"` + // ID is an unique identifier for the story in the chat + ID int `json:"id"` +} // Video represents a video file. type Video struct {

@@ -1577,6 +1607,12 @@ // auto-delete timer settings.

type MessageAutoDeleteTimerChanged struct { // New auto-delete time for messages in the chat. MessageAutoDeleteTime int `json:"message_auto_delete_time"` +} + +// ChatBoostAdded represents a service message about a user boosting a chat. +type ChatBoostAdded struct { + // BoostCount is a number of boosts added by the user + BoostCount int `json:"boost_count"` } // ForumTopicCreated represents a service message about a new forum topic