chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2

Bumps [github.com/PaulSonOfLars/gotgbot/v2](https://github.com/PaulSonOfLars/gotgbot) from 2.0.0-rc.32 to 2.0.0-rc.33.
- [Release notes](https://github.com/PaulSonOfLars/gotgbot/releases)
- [Commits](https://github.com/PaulSonOfLars/gotgbot/compare/v2.0.0-rc.32...v2.0.0-rc.33)

---
updated-dependencies:
- dependency-name: github.com/PaulSonOfLars/gotgbot/v2
  dependency-version: 2.0.0-rc.33
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-07-07 08:02:39 +00:00
committed by GitHub
parent fe9f478455
commit bcb6fac76a
7 changed files with 312 additions and 24 deletions

2
go.mod
View File

@@ -5,7 +5,7 @@ go 1.23.0
require (
dario.cat/mergo v1.0.2
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.32
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.33
github.com/alecthomas/kong v1.6.1
github.com/bmatcuk/doublestar/v3 v3.0.0
github.com/containerd/platforms v0.2.1

4
go.sum
View File

@@ -15,8 +15,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.32 h1:+YzI72wzNTcaPUDVcSxeYQdHfvEk8mPGZh/yTk5kkRg=
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.32/go.mod h1:BSzsfjlE0wakLw2/U1FtO8rdVt+Z+4VyoGo/YcGD9QQ=
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.33 h1:uyVD1QSS7ftd/DE2x5OFRx4PYyhq9n4edvFJRExVWVk=
github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.33/go.mod h1:BSzsfjlE0wakLw2/U1FtO8rdVt+Z+4VyoGo/YcGD9QQ=
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=

View File

@@ -240,6 +240,11 @@ func (im InaccessibleMessage) EditCaption(b *Bot, opts *EditMessageCaptionOpts)
return b.EditMessageCaption(opts)
}
// EditChecklist Helper method for Bot.EditMessageChecklist.
func (im InaccessibleMessage) EditChecklist(b *Bot, businessConnectionId string, checklist InputChecklist, opts *EditMessageChecklistOpts) (*Message, error) {
return b.EditMessageChecklist(businessConnectionId, im.Chat.Id, im.MessageId, checklist, opts)
}
// EditLiveLocation Helper method for Bot.EditMessageLiveLocation.
func (im InaccessibleMessage) EditLiveLocation(b *Bot, latitude float64, longitude float64, opts *EditMessageLiveLocationOpts) (*Message, bool, error) {
if opts == nil {
@@ -384,6 +389,11 @@ func (m Message) EditCaption(b *Bot, opts *EditMessageCaptionOpts) (*Message, bo
return b.EditMessageCaption(opts)
}
// EditChecklist Helper method for Bot.EditMessageChecklist.
func (m Message) EditChecklist(b *Bot, businessConnectionId string, checklist InputChecklist, opts *EditMessageChecklistOpts) (*Message, error) {
return b.EditMessageChecklist(businessConnectionId, m.Chat.Id, m.MessageId, checklist, opts)
}
// EditLiveLocation Helper method for Bot.EditMessageLiveLocation.
func (m Message) EditLiveLocation(b *Bot, latitude float64, longitude float64, opts *EditMessageLiveLocationOpts) (*Message, bool, error) {
if opts == nil {

View File

@@ -1067,7 +1067,7 @@ type DeleteBusinessMessagesOpts struct {
// DeleteBusinessMessages (https://core.telegram.org/bots/api#deletebusinessmessages)
//
// Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.
// Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.
// - businessConnectionId (type string): Unique identifier of the business connection on behalf of which to delete the messages
// - messageIds (type []int64): A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted
// - opts (type DeleteBusinessMessagesOpts): All optional parameters.
@@ -1738,6 +1738,59 @@ func (bot *Bot) EditMessageCaptionWithContext(ctx context.Context, opts *EditMes
}
// EditMessageChecklistOpts is the set of optional fields for Bot.EditMessageChecklist and Bot.EditMessageChecklistWithContext.
type EditMessageChecklistOpts struct {
// A JSON-serialized object for the new inline keyboard for the message
ReplyMarkup InlineKeyboardMarkup
// RequestOpts are an additional optional field to configure timeouts for individual requests
RequestOpts *RequestOpts
}
// EditMessageChecklist (https://core.telegram.org/bots/api#editmessagechecklist)
//
// Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.
// - businessConnectionId (type string): Unique identifier of the business connection on behalf of which the message will be sent
// - chatId (type int64): Unique identifier for the target chat
// - messageId (type int64): Unique identifier for the target message
// - checklist (type InputChecklist): A JSON-serialized object for the new checklist
// - opts (type EditMessageChecklistOpts): All optional parameters.
func (bot *Bot) EditMessageChecklist(businessConnectionId string, chatId int64, messageId int64, checklist InputChecklist, opts *EditMessageChecklistOpts) (*Message, error) {
return bot.EditMessageChecklistWithContext(context.Background(), businessConnectionId, chatId, messageId, checklist, opts)
}
// EditMessageChecklistWithContext is the same as Bot.EditMessageChecklist, but with a context.Context parameter
func (bot *Bot) EditMessageChecklistWithContext(ctx context.Context, businessConnectionId string, chatId int64, messageId int64, checklist InputChecklist, opts *EditMessageChecklistOpts) (*Message, error) {
v := map[string]string{}
v["business_connection_id"] = businessConnectionId
v["chat_id"] = strconv.FormatInt(chatId, 10)
v["message_id"] = strconv.FormatInt(messageId, 10)
bs, err := json.Marshal(checklist)
if err != nil {
return nil, fmt.Errorf("failed to marshal field checklist: %w", err)
}
v["checklist"] = string(bs)
if opts != nil {
bs, err := json.Marshal(opts.ReplyMarkup)
if err != nil {
return nil, fmt.Errorf("failed to marshal field reply_markup: %w", err)
}
v["reply_markup"] = string(bs)
}
var reqOpts *RequestOpts
if opts != nil {
reqOpts = opts.RequestOpts
}
r, err := bot.RequestWithContext(ctx, "editMessageChecklist", v, nil, reqOpts)
if err != nil {
return nil, err
}
var m Message
return &m, json.Unmarshal(r, &m)
}
// EditMessageLiveLocationOpts is the set of optional fields for Bot.EditMessageLiveLocation and Bot.EditMessageLiveLocationWithContext.
type EditMessageLiveLocationOpts struct {
// Unique identifier of the business connection on behalf of which the message to be edited was sent
@@ -3021,6 +3074,38 @@ func (bot *Bot) GetMyShortDescriptionWithContext(ctx context.Context, opts *GetM
return &b, json.Unmarshal(r, &b)
}
// GetMyStarBalanceOpts is the set of optional fields for Bot.GetMyStarBalance and Bot.GetMyStarBalanceWithContext.
type GetMyStarBalanceOpts struct {
// RequestOpts are an additional optional field to configure timeouts for individual requests
RequestOpts *RequestOpts
}
// GetMyStarBalance (https://core.telegram.org/bots/api#getmystarbalance)
//
// A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.
// - opts (type GetMyStarBalanceOpts): All optional parameters.
func (bot *Bot) GetMyStarBalance(opts *GetMyStarBalanceOpts) (*StarAmount, error) {
return bot.GetMyStarBalanceWithContext(context.Background(), opts)
}
// GetMyStarBalanceWithContext is the same as Bot.GetMyStarBalance, but with a context.Context parameter
func (bot *Bot) GetMyStarBalanceWithContext(ctx context.Context, opts *GetMyStarBalanceOpts) (*StarAmount, error) {
v := map[string]string{}
var reqOpts *RequestOpts
if opts != nil {
reqOpts = opts.RequestOpts
}
r, err := bot.RequestWithContext(ctx, "getMyStarBalance", v, nil, reqOpts)
if err != nil {
return nil, err
}
var s StarAmount
return &s, json.Unmarshal(r, &s)
}
// GetStarTransactionsOpts is the set of optional fields for Bot.GetStarTransactions and Bot.GetStarTransactionsWithContext.
type GetStarTransactionsOpts struct {
// Number of transactions to skip in the response
@@ -3548,7 +3633,7 @@ func (bot *Bot) PostStoryWithContext(ctx context.Context, businessConnectionId s
type PromoteChatMemberOpts struct {
// Pass True if the administrator's presence in the chat is hidden
IsAnonymous bool
// Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
// Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
CanManageChat bool
// Pass True if the administrator can delete messages of other users
CanDeleteMessages bool
@@ -3568,7 +3653,7 @@ type PromoteChatMemberOpts struct {
CanEditStories bool
// Pass True if the administrator can delete stories posted by other users
CanDeleteStories bool
// Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only
// Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
CanPostMessages bool
// Pass True if the administrator can edit messages of other users and can pin messages; for channels only
CanEditMessages bool
@@ -4358,6 +4443,75 @@ func (bot *Bot) SendChatActionWithContext(ctx context.Context, chatId int64, act
return b, json.Unmarshal(r, &b)
}
// SendChecklistOpts is the set of optional fields for Bot.SendChecklist and Bot.SendChecklistWithContext.
type SendChecklistOpts struct {
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool
// Unique identifier of the message effect to be added to the message
MessageEffectId string
// A JSON-serialized object for description of the message to reply to
ReplyParameters *ReplyParameters
// A JSON-serialized object for an inline keyboard
ReplyMarkup InlineKeyboardMarkup
// RequestOpts are an additional optional field to configure timeouts for individual requests
RequestOpts *RequestOpts
}
// SendChecklist (https://core.telegram.org/bots/api#sendchecklist)
//
// Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
// - businessConnectionId (type string): Unique identifier of the business connection on behalf of which the message will be sent
// - chatId (type int64): Unique identifier for the target chat
// - checklist (type InputChecklist): A JSON-serialized object for the checklist to send
// - opts (type SendChecklistOpts): All optional parameters.
func (bot *Bot) SendChecklist(businessConnectionId string, chatId int64, checklist InputChecklist, opts *SendChecklistOpts) (*Message, error) {
return bot.SendChecklistWithContext(context.Background(), businessConnectionId, chatId, checklist, opts)
}
// SendChecklistWithContext is the same as Bot.SendChecklist, but with a context.Context parameter
func (bot *Bot) SendChecklistWithContext(ctx context.Context, businessConnectionId string, chatId int64, checklist InputChecklist, opts *SendChecklistOpts) (*Message, error) {
v := map[string]string{}
v["business_connection_id"] = businessConnectionId
v["chat_id"] = strconv.FormatInt(chatId, 10)
bs, err := json.Marshal(checklist)
if err != nil {
return nil, fmt.Errorf("failed to marshal field checklist: %w", err)
}
v["checklist"] = string(bs)
if opts != nil {
v["disable_notification"] = strconv.FormatBool(opts.DisableNotification)
v["protect_content"] = strconv.FormatBool(opts.ProtectContent)
v["message_effect_id"] = opts.MessageEffectId
if opts.ReplyParameters != nil {
bs, err := json.Marshal(opts.ReplyParameters)
if err != nil {
return nil, fmt.Errorf("failed to marshal field reply_parameters: %w", err)
}
v["reply_parameters"] = string(bs)
}
bs, err := json.Marshal(opts.ReplyMarkup)
if err != nil {
return nil, fmt.Errorf("failed to marshal field reply_markup: %w", err)
}
v["reply_markup"] = string(bs)
}
var reqOpts *RequestOpts
if opts != nil {
reqOpts = opts.RequestOpts
}
r, err := bot.RequestWithContext(ctx, "sendChecklist", v, nil, reqOpts)
if err != nil {
return nil, err
}
var m Message
return &m, json.Unmarshal(r, &m)
}
// SendContactOpts is the set of optional fields for Bot.SendContact and Bot.SendContactWithContext.
type SendContactOpts struct {
// Unique identifier of the business connection on behalf of which the message will be sent
@@ -5452,7 +5606,7 @@ type SendPollOpts struct {
// Use this method to send a native poll. On success, the sent Message is returned.
// - chatId (type int64): Unique identifier for the target chat
// - question (type string): Poll question, 1-300 characters
// - options (type []InputPollOption): A JSON-serialized list of 2-10 answer options
// - options (type []InputPollOption): A JSON-serialized list of 2-12 answer options
// - opts (type SendPollOpts): All optional parameters.
func (bot *Bot) SendPoll(chatId int64, question string, options []InputPollOption, opts *SendPollOpts) (*Message, error) {
return bot.SendPollWithContext(context.Background(), chatId, question, options, opts)

View File

@@ -1045,7 +1045,7 @@ type BusinessBotRights struct {
// Optional. True, if the bot can mark incoming private messages as read
CanReadMessages bool `json:"can_read_messages,omitempty"`
// Optional. True, if the bot can delete messages sent by the bot
CanDeleteOutgoingMessages bool `json:"can_delete_outgoing_messages,omitempty"`
CanDeleteSentMessages bool `json:"can_delete_sent_messages,omitempty"`
// Optional. True, if the bot can delete all private messages in managed chats
CanDeleteAllMessages bool `json:"can_delete_all_messages,omitempty"`
// Optional. True, if the bot can edit the first and last name of the business account
@@ -1225,7 +1225,7 @@ type Chat struct {
type ChatAdministratorRights struct {
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
CanManageChat bool `json:"can_manage_chat"`
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
@@ -1245,7 +1245,7 @@ type ChatAdministratorRights struct {
CanEditStories bool `json:"can_edit_stories"`
// True, if the administrator can delete stories posted by other users
CanDeleteStories bool `json:"can_delete_stories"`
// Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only
// Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
CanPostMessages bool `json:"can_post_messages,omitempty"`
// Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
CanEditMessages bool `json:"can_edit_messages,omitempty"`
@@ -1918,7 +1918,7 @@ type MergedChatMember struct {
CustomTitle string `json:"custom_title,omitempty"`
// Optional. True, if the bot is allowed to edit administrator privileges of that user (Only for administrator)
CanBeEdited bool `json:"can_be_edited,omitempty"`
// Optional. True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. (Only for administrator)
// Optional. True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. (Only for administrator)
CanManageChat bool `json:"can_manage_chat,omitempty"`
// Optional. True, if the administrator can delete messages of other users (Only for administrator)
CanDeleteMessages bool `json:"can_delete_messages,omitempty"`
@@ -1938,7 +1938,7 @@ type MergedChatMember struct {
CanEditStories bool `json:"can_edit_stories,omitempty"`
// Optional. True, if the administrator can delete stories posted by other users (Only for administrator)
CanDeleteStories bool `json:"can_delete_stories,omitempty"`
// Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only (Only for administrator)
// Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only (Only for administrator)
CanPostMessages bool `json:"can_post_messages,omitempty"`
// Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only (Only for administrator)
CanEditMessages bool `json:"can_edit_messages,omitempty"`
@@ -1964,7 +1964,7 @@ type MergedChatMember struct {
CanSendVideoNotes bool `json:"can_send_video_notes,omitempty"`
// Optional. True, if the user is allowed to send voice notes (Only for restricted)
CanSendVoiceNotes bool `json:"can_send_voice_notes,omitempty"`
// Optional. True, if the user is allowed to send polls (Only for restricted)
// Optional. True, if the user is allowed to send polls and checklists (Only for restricted)
CanSendPolls bool `json:"can_send_polls,omitempty"`
// Optional. True, if the user is allowed to send animations, games, stickers and use inline bots (Only for restricted)
CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"`
@@ -2093,7 +2093,7 @@ type ChatMemberAdministrator struct {
CanBeEdited bool `json:"can_be_edited"`
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
CanManageChat bool `json:"can_manage_chat"`
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
@@ -2113,7 +2113,7 @@ type ChatMemberAdministrator struct {
CanEditStories bool `json:"can_edit_stories"`
// True, if the administrator can delete stories posted by other users
CanDeleteStories bool `json:"can_delete_stories"`
// Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only
// Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
CanPostMessages bool `json:"can_post_messages,omitempty"`
// Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
CanEditMessages bool `json:"can_edit_messages,omitempty"`
@@ -2378,7 +2378,7 @@ type ChatMemberRestricted struct {
CanSendVideoNotes bool `json:"can_send_video_notes"`
// True, if the user is allowed to send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
// True, if the user is allowed to send polls
// True, if the user is allowed to send polls and checklists
CanSendPolls bool `json:"can_send_polls"`
// True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages bool `json:"can_send_other_messages"`
@@ -2523,7 +2523,7 @@ type ChatPermissions struct {
CanSendVideoNotes bool `json:"can_send_video_notes,omitempty"`
// Optional. True, if the user is allowed to send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes,omitempty"`
// Optional. True, if the user is allowed to send polls
// Optional. True, if the user is allowed to send polls and checklists
CanSendPolls bool `json:"can_send_polls,omitempty"`
// Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"`
@@ -2569,6 +2569,60 @@ type ChatShared struct {
Photo []PhotoSize `json:"photo,omitempty"`
}
// Checklist (https://core.telegram.org/bots/api#checklist)
//
// Describes a checklist.
type Checklist struct {
// Title of the checklist
Title string `json:"title"`
// Optional. Special entities that appear in the checklist title
TitleEntities []MessageEntity `json:"title_entities,omitempty"`
// List of tasks in the checklist
Tasks []ChecklistTask `json:"tasks,omitempty"`
// Optional. True, if users other than the creator of the list can add tasks to the list
OthersCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
// Optional. True, if users other than the creator of the list can mark tasks as done or not done
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}
// ChecklistTask (https://core.telegram.org/bots/api#checklisttask)
//
// Describes a task in a checklist.
type ChecklistTask struct {
// Unique identifier of the task
Id int64 `json:"id"`
// Text of the task
Text string `json:"text"`
// Optional. Special entities that appear in the task text
TextEntities []MessageEntity `json:"text_entities,omitempty"`
// Optional. User that completed the task; omitted if the task wasn't completed
CompletedByUser *User `json:"completed_by_user,omitempty"`
// Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed
CompletionDate int64 `json:"completion_date,omitempty"`
}
// ChecklistTasksAdded (https://core.telegram.org/bots/api#checklisttasksadded)
//
// Describes a service message about tasks added to a checklist.
type ChecklistTasksAdded struct {
// Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
ChecklistMessage *Message `json:"checklist_message,omitempty"`
// List of tasks added to the checklist
Tasks []ChecklistTask `json:"tasks,omitempty"`
}
// ChecklistTasksDone (https://core.telegram.org/bots/api#checklisttasksdone)
//
// Describes a service message about checklist tasks marked as done or not done.
type ChecklistTasksDone struct {
// Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
ChecklistMessage *Message `json:"checklist_message,omitempty"`
// Optional. Identifiers of the tasks that were marked as done
MarkedAsDoneTaskIds []int64 `json:"marked_as_done_task_ids,omitempty"`
// Optional. Identifiers of the tasks that were marked as not done
MarkedAsNotDoneTaskIds []int64 `json:"marked_as_not_done_task_ids,omitempty"`
}
// ChosenInlineResult (https://core.telegram.org/bots/api#choseninlineresult)
//
// Represents a result of an inline query that was chosen by the user and sent to their chat partner.
@@ -2620,6 +2674,16 @@ type Dice struct {
Value int64 `json:"value"`
}
// DirectMessagePriceChanged (https://core.telegram.org/bots/api#directmessagepricechanged)
//
// Describes a service message about a change in the price of direct messages sent to a channel chat.
type DirectMessagePriceChanged struct {
// True, if direct messages are enabled for the channel chat; false otherwise
AreDirectMessagesEnabled bool `json:"are_direct_messages_enabled"`
// Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.
DirectMessageStarCount int64 `json:"direct_message_star_count,omitempty"`
}
// Document (https://core.telegram.org/bots/api#document)
//
// This object represents a general file (as opposed to photos, voice messages and audio files).
@@ -2710,6 +2774,8 @@ type ExternalReplyInfo struct {
Voice *Voice `json:"voice,omitempty"`
// Optional. True, if the message media is covered by a spoiler animation
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
// Optional. Message is a checklist
Checklist *Checklist `json:"checklist,omitempty"`
// Optional. Message is a shared contact, information about the contact
Contact *Contact `json:"contact,omitempty"`
// Optional. Message is a dice with random value
@@ -2749,6 +2815,7 @@ func (v *ExternalReplyInfo) UnmarshalJSON(b []byte) error {
VideoNote *VideoNote `json:"video_note"`
Voice *Voice `json:"voice"`
HasMediaSpoiler bool `json:"has_media_spoiler"`
Checklist *Checklist `json:"checklist"`
Contact *Contact `json:"contact"`
Dice *Dice `json:"dice"`
Game *Game `json:"game"`
@@ -2783,6 +2850,7 @@ func (v *ExternalReplyInfo) UnmarshalJSON(b []byte) error {
v.VideoNote = t.VideoNote
v.Voice = t.Voice
v.HasMediaSpoiler = t.HasMediaSpoiler
v.Checklist = t.Checklist
v.Contact = t.Contact
v.Dice = t.Dice
v.Game = t.Game
@@ -4725,6 +4793,38 @@ type InlineQueryResultsButton struct {
StartParameter string `json:"start_parameter,omitempty"`
}
// InputChecklist (https://core.telegram.org/bots/api#inputchecklist)
//
// Describes a checklist to create.
type InputChecklist struct {
// Title of the checklist; 1-255 characters after entities parsing
Title string `json:"title"`
// Optional. Mode for parsing entities in the title. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
TitleEntities []MessageEntity `json:"title_entities,omitempty"`
// List of 1-30 tasks in the checklist
Tasks []InputChecklistTask `json:"tasks,omitempty"`
// Optional. Pass True if other users can add tasks to the checklist
OthersCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
// Optional. Pass True if other users can mark tasks as done or not done in the checklist
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}
// InputChecklistTask (https://core.telegram.org/bots/api#inputchecklisttask)
//
// Describes a task to add to a checklist.
type InputChecklistTask struct {
// Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist
Id int64 `json:"id"`
// Text of the task; 1-100 characters after entities parsing
Text string `json:"text"`
// Optional. Mode for parsing entities in the text. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
TextEntities []MessageEntity `json:"text_entities,omitempty"`
}
// InputContactMessageContent (https://core.telegram.org/bots/api#inputcontactmessagecontent)
//
// Represents the content of a contact message to be sent as the result of an inline query.
@@ -5557,7 +5657,7 @@ var (
// MergedInputProfilePhoto is a helper type to simplify interactions with the various InputProfilePhoto subtypes.
type MergedInputProfilePhoto struct {
// Type of the profile photo, must be "static"
// Type of the profile photo
Type string `json:"type"`
// Optional. The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass "attach://<file_attach_name>" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files (Only for static)
Photo string `json:"photo,omitempty"`
@@ -5694,7 +5794,7 @@ var (
// MergedInputStoryContent is a helper type to simplify interactions with the various InputStoryContent subtypes.
type MergedInputStoryContent struct {
// Type of the content, must be "photo"
// Type of the content
Type string `json:"type"`
// Optional. The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass "attach://<file_attach_name>" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files (Only for photo)
Photo string `json:"photo,omitempty"`
@@ -6045,6 +6145,8 @@ type MaybeInaccessibleMessage interface {
Delete(b *Bot, opts *DeleteMessageOpts) (bool, error)
// EditCaption Helper method for Bot.EditMessageCaption.
EditCaption(b *Bot, opts *EditMessageCaptionOpts) (*Message, bool, error)
// EditChecklist Helper method for Bot.EditMessageChecklist.
EditChecklist(b *Bot, businessConnectionId string, checklist InputChecklist, opts *EditMessageChecklistOpts) (*Message, error)
// EditLiveLocation Helper method for Bot.EditMessageLiveLocation.
EditLiveLocation(b *Bot, latitude float64, longitude float64, opts *EditMessageLiveLocationOpts) (*Message, bool, error)
// EditMedia Helper method for Bot.EditMessageMedia.
@@ -6380,6 +6482,8 @@ type Message struct {
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. True, if the message media is covered by a spoiler animation
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
// Optional. Message is a checklist
Checklist *Checklist `json:"checklist,omitempty"`
// Optional. Message is a shared contact, information about the contact
Contact *Contact `json:"contact,omitempty"`
// Optional. Message is a dice with random value
@@ -6442,6 +6546,12 @@ type Message struct {
BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"`
// Optional. Service message: chat background set
ChatBackgroundSet *ChatBackground `json:"chat_background_set,omitempty"`
// Optional. Service message: some tasks in a checklist were marked as done or not done
ChecklistTasksDone *ChecklistTasksDone `json:"checklist_tasks_done,omitempty"`
// Optional. Service message: tasks were added to a checklist
ChecklistTasksAdded *ChecklistTasksAdded `json:"checklist_tasks_added,omitempty"`
// Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed
DirectMessagePriceChanged *DirectMessagePriceChanged `json:"direct_message_price_changed,omitempty"`
// Optional. Service message: forum topic created
ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"`
// Optional. Service message: forum topic edited
@@ -6523,6 +6633,7 @@ func (v *Message) UnmarshalJSON(b []byte) error {
CaptionEntities []MessageEntity `json:"caption_entities"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
HasMediaSpoiler bool `json:"has_media_spoiler"`
Checklist *Checklist `json:"checklist"`
Contact *Contact `json:"contact"`
Dice *Dice `json:"dice"`
Game *Game `json:"game"`
@@ -6554,6 +6665,9 @@ func (v *Message) UnmarshalJSON(b []byte) error {
ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered"`
BoostAdded *ChatBoostAdded `json:"boost_added"`
ChatBackgroundSet *ChatBackground `json:"chat_background_set"`
ChecklistTasksDone *ChecklistTasksDone `json:"checklist_tasks_done"`
ChecklistTasksAdded *ChecklistTasksAdded `json:"checklist_tasks_added"`
DirectMessagePriceChanged *DirectMessagePriceChanged `json:"direct_message_price_changed"`
ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created"`
ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited"`
ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed"`
@@ -6622,6 +6736,7 @@ func (v *Message) UnmarshalJSON(b []byte) error {
v.CaptionEntities = t.CaptionEntities
v.ShowCaptionAboveMedia = t.ShowCaptionAboveMedia
v.HasMediaSpoiler = t.HasMediaSpoiler
v.Checklist = t.Checklist
v.Contact = t.Contact
v.Dice = t.Dice
v.Game = t.Game
@@ -6656,6 +6771,9 @@ func (v *Message) UnmarshalJSON(b []byte) error {
v.ProximityAlertTriggered = t.ProximityAlertTriggered
v.BoostAdded = t.BoostAdded
v.ChatBackgroundSet = t.ChatBackgroundSet
v.ChecklistTasksDone = t.ChecklistTasksDone
v.ChecklistTasksAdded = t.ChecklistTasksAdded
v.DirectMessagePriceChanged = t.DirectMessagePriceChanged
v.ForumTopicCreated = t.ForumTopicCreated
v.ForumTopicEdited = t.ForumTopicEdited
v.ForumTopicClosed = t.ForumTopicClosed
@@ -7295,6 +7413,8 @@ type OwnedGiftUnique struct {
CanBeTransferred bool `json:"can_be_transferred,omitempty"`
// Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
TransferStarCount int64 `json:"transfer_star_count,omitempty"`
// Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now
NextTransferDate string `json:"next_transfer_date,omitempty"`
}
// GetType is a helper method to easily access the common fields of an interface.
@@ -8402,7 +8522,7 @@ var (
type MergedReactionType struct {
// Type of the reaction
Type string `json:"type"`
// Optional. Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" (Only for emoji)
// Optional. Reaction emoji. Currently, it can be one of "❤", "👍", "👎", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" (Only for emoji)
Emoji string `json:"emoji,omitempty"`
// Optional. Custom emoji identifier (Only for custom_emoji)
CustomEmojiId string `json:"custom_emoji_id,omitempty"`
@@ -8531,7 +8651,7 @@ func (v ReactionTypeCustomEmoji) reactionType() {}
//
// The reaction is based on an emoji.
type ReactionTypeEmoji struct {
// Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡"
// Reaction emoji. Currently, it can be one of "❤", "👍", "👎", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡"
Emoji string `json:"emoji"`
}
@@ -10012,12 +10132,16 @@ type UniqueGiftBackdropColors struct {
type UniqueGiftInfo struct {
// Information about the gift
Gift UniqueGift `json:"gift"`
// Origin of the gift. Currently, either "upgrade" or "transfer"
// Origin of the gift. Currently, either "upgrade" for gifts upgraded from regular gifts, "transfer" for gifts transferred from other users or channels, or "resale" for gifts bought from other users
Origin string `json:"origin"`
// Optional. For gifts bought from other users, the price paid for the gift
LastResaleStarCount int64 `json:"last_resale_star_count,omitempty"`
// Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
OwnedGiftId string `json:"owned_gift_id,omitempty"`
// Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
TransferStarCount int64 `json:"transfer_star_count,omitempty"`
// Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now
NextTransferDate string `json:"next_transfer_date,omitempty"`
}
// UniqueGiftModel (https://core.telegram.org/bots/api#uniquegiftmodel)

View File

@@ -1 +1 @@
2b29b473568cc837e56d95160b3f8409e1318537
8c754a8e61a01d0b3ce3dea20efc8ede1abeac6c

2
vendor/modules.txt vendored
View File

@@ -25,7 +25,7 @@ github.com/Microsoft/go-winio/internal/fs
github.com/Microsoft/go-winio/internal/socket
github.com/Microsoft/go-winio/internal/stringbuffer
github.com/Microsoft/go-winio/pkg/guid
# github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.32
# github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-rc.33
## explicit; go 1.22
github.com/PaulSonOfLars/gotgbot/v2
# github.com/PuerkitoBio/goquery v1.8.1