add required "SuggestedTipAmounts" field in NewInvoice
Marco Andronaco andronacomarco@gmail.com
Sun, 21 Jul 2024 17:04:25 +0200
1 files changed,
10 insertions(+),
8 deletions(-)
jump to
M
helper_methods.go
→
helper_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.