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
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.