✨ Added NewInvoice helper
This commit is contained in:
parent
2463dac103
commit
02e1c3cdfa
13
toolbox.go
13
toolbox.go
|
@ -25,6 +25,19 @@ func NewMessage(chatID int64, text string) *SendMessageParameters {
|
||||||
return &SendMessageParameters{ChatID: chatID, Text: text}
|
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 {
|
func NewReplyKeyboard(rows ...[]KeyboardButton) *ReplyKeyboardMarkup {
|
||||||
var keyboard [][]KeyboardButton
|
var keyboard [][]KeyboardButton
|
||||||
keyboard = append(keyboard, rows...)
|
keyboard = append(keyboard, rows...)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user