all repos — telegram-bot-api @ 861b023805bcfc625de29435542767bab48b91b2

Golang bindings for the Telegram Bot API

Merge pull request #31 from BiRabittoh/master

Add required "SuggestedTipAmounts" field in NewInvoice
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Mon, 22 Jul 2024 21:29:30 +0300
commit

861b023805bcfc625de29435542767bab48b91b2

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.