1
0

Added NewInvoice helper

This commit is contained in:
Maxim Lebedev 2017-10-06 13:49:23 +05:00
parent 2463dac103
commit 02e1c3cdfa
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F

View File

@ -25,6 +25,19 @@ func NewMessage(chatID int64, text string) *SendMessageParameters {
return &SendMessageParameters{ChatID: chatID, Text: text}
}
func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices ...LabeledPrice) *SendInvoiceParameters {
return &SendInvoiceParameters{
ChatID: chatID,
Title: title,
Description: description,
Payload: payload,
ProviderToken: providerToken,
StartParameter: startParameter,
Currency: currency,
Prices: prices,
}
}
func NewReplyKeyboard(rows ...[]KeyboardButton) *ReplyKeyboardMarkup {
var keyboard [][]KeyboardButton
keyboard = append(keyboard, rows...)