Skip to content

Commit

Permalink
Merge branch 'v2' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSonOfLars authored Jul 31, 2024
2 parents 10015b9 + 1857be4 commit ee66bac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions gen_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,8 @@ func (bot *Bot) LogOut(opts *LogOutOpts) (bool, error) {

// PinChatMessageOpts is the set of optional fields for Bot.PinChatMessage.
type PinChatMessageOpts struct {
// Unique identifier of the business connection on behalf of which the message will be pinned
BusinessConnectionId string
// Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.
DisableNotification bool
// RequestOpts are an additional optional field to configure timeouts for individual requests
Expand All @@ -2626,6 +2628,7 @@ func (bot *Bot) PinChatMessage(chatId int64, messageId int64, opts *PinChatMessa
v["chat_id"] = strconv.FormatInt(chatId, 10)
v["message_id"] = strconv.FormatInt(messageId, 10)
if opts != nil {
v["business_connection_id"] = opts.BusinessConnectionId
v["disable_notification"] = strconv.FormatBool(opts.DisableNotification)
}

Expand Down Expand Up @@ -5471,7 +5474,7 @@ func (bot *Bot) SetStickerPositionInSet(sticker string, position int64, opts *Se

// SetStickerSetThumbnailOpts is the set of optional fields for Bot.SetStickerSetThumbnail.
type SetStickerSetThumbnailOpts struct {
// A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
// A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
Thumbnail InputFile
// RequestOpts are an additional optional field to configure timeouts for individual requests
RequestOpts *RequestOpts
Expand Down Expand Up @@ -5900,7 +5903,9 @@ func (bot *Bot) UnpinAllGeneralForumTopicMessages(chatId int64, opts *UnpinAllGe

// UnpinChatMessageOpts is the set of optional fields for Bot.UnpinChatMessage.
type UnpinChatMessageOpts struct {
// Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
// Unique identifier of the business connection on behalf of which the message will be unpinned
BusinessConnectionId string
// Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.
MessageId *int64
// RequestOpts are an additional optional field to configure timeouts for individual requests
RequestOpts *RequestOpts
Expand All @@ -5915,6 +5920,7 @@ func (bot *Bot) UnpinChatMessage(chatId int64, opts *UnpinChatMessageOpts) (bool
v := map[string]string{}
v["chat_id"] = strconv.FormatInt(chatId, 10)
if opts != nil {
v["business_connection_id"] = opts.BusinessConnectionId
if opts.MessageId != nil {
v["message_id"] = strconv.FormatInt(*opts.MessageId, 10)
}
Expand Down
2 changes: 2 additions & 0 deletions gen_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8777,6 +8777,8 @@ type User struct {
SupportsInlineQueries bool `json:"supports_inline_queries,omitempty"`
// Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"`
// Optional. True, if the bot has a main Web App. Returned only in getMe.
HasMainWebApp bool `json:"has_main_web_app,omitempty"`
}

// UserChatBoosts (https://core.telegram.org/bots/api#userchatboosts)
Expand Down
2 changes: 1 addition & 1 deletion spec_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9bcc9ae799d55ec5d08556cfbdfaab49ce0c357d
6c694460e75c07bd789ffd358eff58572caebd35

0 comments on commit ee66bac

Please sign in to comment.