all repos — telegram-bot-api @ 17d3e395d52d40e76b22f043424937a4e8d2f58c

Golang bindings for the Telegram Bot API

BOT API 6.8 implementation
OvyFlash olegshva4ko@gmail.com
Sat, 30 Dec 2023 16:55:43 +0200
commit

17d3e395d52d40e76b22f043424937a4e8d2f58c

parent

371d8b695f367525262fa97a8833a1bc0ed814e0

2 files changed, 36 insertions(+), 5 deletions(-)

jump to
M configs.goconfigs.go

@@ -93,7 +93,7 @@ // UpdateTypeChatMember is when the bot must be an administrator in the chat and must explicitly specify

// this update in the list of allowed_updates to receive these updates. UpdateTypeChatMember = "chat_member" - // UpdateTypeChatJoinRequest is request to join the chat has been sent. + // UpdateTypeChatJoinRequest is request to join the chat has been sent. // The bot must have the can_invite_users administrator right in the chat to receive these updates. UpdateTypeChatJoinRequest = "chat_join_request" )

@@ -2695,6 +2695,17 @@ type UnhideGeneralForumTopicConfig struct{ BaseForum }

func (config UnhideGeneralForumTopicConfig) method() string { return "unhideGeneralForumTopic" +} + +// UnpinAllGeneralForumTopicMessagesConfig allows you to to clear +// the list of pinned messages in a General forum topic. +// The bot must be an administrator in the chat for this to work +// and must have the can_pin_messages administrator right in the supergroup. +// Returns True on success. +type UnpinAllGeneralForumTopicMessagesConfig struct{ BaseForum } + +func (config UnpinAllGeneralForumTopicMessagesConfig) method() string { + return "unpinAllGeneralForumTopicMessages" } // MediaGroupConfig allows you to send a group of media.
M types.gotypes.go

@@ -281,6 +281,11 @@ // in a private chat. Returned only in getChat.

// // optional EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"` + // Expiration date of the emoji status of the chat or the other party + // in a private chat, in Unix time, if any. Returned only in getChat. + // + // optional + EmojiStatusCustomEmojiDate int64 `json:"emoji_status_expiration_date,omitempty"` // Bio is the bio of the other party in a private chat. Returned only in // getChat //

@@ -526,6 +531,10 @@ // Sticker message is a sticker, information about the sticker;

// // optional Sticker *Sticker `json:"sticker,omitempty"` + // Story message is a forwarded story; + // + // optional + Story *Story `json:"story,omitempty"` // Video message is a video, information about the video; // // optional

@@ -1032,6 +1041,9 @@ // optional

FileSize int64 `json:"file_size,omitempty"` } +// Story represents a message about a forwarded story in the chat. +type Story struct{} + // Video represents a video file. type Video struct { // FileID identifier for this file, which can be used to download or reuse

@@ -1149,8 +1161,16 @@ // PollAnswer represents an answer of a user in a non-anonymous poll.

type PollAnswer struct { // PollID is the unique poll identifier PollID string `json:"poll_id"` - // User who changed the answer to the poll - User User `json:"user"` + // Chat that changed the answer to the poll, if the voter is anonymous. + // + // Optional + VoterChat *Chat `json:"voter_chat,omitempty"` + // User who changed the answer to the poll, if the voter isn't anonymous + // For backward compatibility, the field user in such objects + // will contain the user 136817688 (@Channel_Bot). + // + // Optional + User *User `json:"user,omitempty"` // OptionIDs is the 0-based identifiers of poll options chosen by the user. // May be empty if user retracted vote. OptionIDs []int `json:"option_ids"`

@@ -2066,7 +2086,7 @@ // for joining by invite link events only.

// // optional InviteLink *ChatInviteLink `json:"invite_link,omitempty"` - // ViaChatFolderInviteLink is True, if the user joined the chat + // ViaChatFolderInviteLink is True, if the user joined the chat // via a chat folder invite link // // optional

@@ -2227,7 +2247,7 @@ ChatID int64 `json:"chat_id,omitempty"`

UserID int64 `json:"user_id,omitempty"` } -//BotName represents the bot's name. +// BotName represents the bot's name. type BotName struct { Name string `json:"name"` }