all repos — telegram-bot-api @ ac7ff118744f5fef3f3bff4764db1fbf223bb4d7

Golang bindings for the Telegram Bot API

add required "SuggestedTipAmounts" field in NewInvoice
Marco Andronaco andronacomarco@gmail.com
Sun, 21 Jul 2024 17:04:25 +0200
commit

ac7ff118744f5fef3f3bff4764db1fbf223bb4d7

parent

9d1c899aea3f0de57161055b2d83abc335a58583

1 files changed, 10 insertions(+), 8 deletions(-)

jump to
M helper_methods.gohelper_methods.go

@@ -834,18 +834,20 @@ }

} // NewInvoice creates a new Invoice request to the user. -func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices []LabeledPrice) InvoiceConfig { +func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices []LabeledPrice, suggestedTipAmounts []int) InvoiceConfig { return InvoiceConfig{ BaseChat: BaseChat{ ChatConfig: ChatConfig{ChatID: chatID}, }, - Title: title, - Description: description, - Payload: payload, - ProviderToken: providerToken, - StartParameter: startParameter, - Currency: currency, - Prices: prices} + Title: title, + Description: description, + Payload: payload, + ProviderToken: providerToken, + StartParameter: startParameter, + Currency: currency, + Prices: prices, + SuggestedTipAmounts: suggestedTipAmounts, + } } // NewChatTitle allows you to update the title of a chat.