Skip to content

Commit

Permalink
Regen bot API lib (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSonOfLars authored Nov 23, 2024
1 parent 794b366 commit 75a452b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gen_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,11 +814,11 @@ func (bot *Bot) CreateForumTopicWithContext(ctx context.Context, chatId int64, n

// CreateInvoiceLinkOpts is the set of optional fields for Bot.CreateInvoiceLink and Bot.CreateInvoiceLinkWithContext.
type CreateInvoiceLinkOpts struct {
// Unique identifier of the business connection on behalf of which the link will be created
// Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.
BusinessConnectionId string
// Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
ProviderToken string
// The number of seconds the subscription will be active for before the next payment. The currency must be set to "XTR" (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified.
// The number of seconds the subscription will be active for before the next payment. The currency must be set to "XTR" (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user.
SubscriptionPeriod int64
// The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
MaxTipAmount int64
Expand Down
6 changes: 3 additions & 3 deletions gen_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8572,7 +8572,7 @@ type MergedTransactionPartner struct {
// Optional. Bot-specified paid media payload (Only for user)
PaidMediaPayload string `json:"paid_media_payload,omitempty"`
// Optional. The gift sent to the user by the bot (Only for user)
Gift string `json:"gift,omitempty"`
Gift *Gift `json:"gift,omitempty"`
// Optional. State of the transaction if the transaction is outgoing (Only for fragment)
WithdrawalState RevenueWithdrawalState `json:"withdrawal_state,omitempty"`
// Optional. The number of successful requests that exceeded regular limits and were therefore billed (Only for telegram_api)
Expand Down Expand Up @@ -8852,7 +8852,7 @@ type TransactionPartnerUser struct {
// Optional. Bot-specified paid media payload
PaidMediaPayload string `json:"paid_media_payload,omitempty"`
// Optional. The gift sent to the user by the bot
Gift string `json:"gift,omitempty"`
Gift *Gift `json:"gift,omitempty"`
}

// UnmarshalJSON is a custom JSON unmarshaller to use the helpers which allow for unmarshalling structs into interfaces.
Expand All @@ -8864,7 +8864,7 @@ func (v *TransactionPartnerUser) UnmarshalJSON(b []byte) error {
SubscriptionPeriod int64 `json:"subscription_period"`
PaidMedia json.RawMessage `json:"paid_media"`
PaidMediaPayload string `json:"paid_media_payload"`
Gift string `json:"gift"`
Gift *Gift `json:"gift"`
}
t := tmp{}
err := json.Unmarshal(b, &t)
Expand Down
2 changes: 1 addition & 1 deletion spec_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ab9a754dd14125ce02510a1d2adec6312ce456e4
0e4637de11e21753a752fb0fa3dbd75eda438c7d

0 comments on commit 75a452b

Please sign in to comment.