diff options
author | Wim <wim@42.be> | 2017-09-11 23:11:48 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-09-11 23:11:48 +0200 |
commit | 035297005115c65fd99b1960bd40af881964a5c3 (patch) | |
tree | 9e11a48fe96068d163e26f6c5120f040f8f863f1 /vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go | |
parent | ed018207226912ee57ecaae06c539aea37e7bb96 (diff) | |
download | matterbridge-msglm-035297005115c65fd99b1960bd40af881964a5c3.tar.gz matterbridge-msglm-035297005115c65fd99b1960bd40af881964a5c3.tar.bz2 matterbridge-msglm-035297005115c65fd99b1960bd40af881964a5c3.zip |
Update vendor (go-telegram-bot-api/telegram-bot-api)
Diffstat (limited to 'vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go')
-rw-r--r-- | vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go b/vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go index 476eeeb0..132d957e 100644 --- a/vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go +++ b/vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go @@ -194,6 +194,37 @@ func NewVideoShare(chatID int64, fileID string) VideoConfig { } } +// NewVideoNoteUpload creates a new video note uploader. +// +// chatID is where to send it, file is a string path to the file, +// FileReader, or FileBytes. +func NewVideoNoteUpload(chatID int64, length int, file interface{}) VideoNoteConfig { + return VideoNoteConfig{ + BaseFile: BaseFile{ + BaseChat: BaseChat{ChatID: chatID}, + File: file, + UseExisting: false, + }, + Length: length, + } +} + +// NewVideoNoteShare shares an existing video. +// You may use this to reshare an existing video without reuploading it. +// +// chatID is where to send it, fileID is the ID of the video +// already uploaded. +func NewVideoNoteShare(chatID int64, length int, fileID string) VideoNoteConfig { + return VideoNoteConfig{ + BaseFile: BaseFile{ + BaseChat: BaseChat{ChatID: chatID}, + FileID: fileID, + UseExisting: true, + }, + Length: length, + } +} + // NewVoiceUpload creates a new voice uploader. // // chatID is where to send it, file is a string path to the file, @@ -609,3 +640,16 @@ func NewCallbackWithAlert(id, text string) CallbackConfig { ShowAlert: true, } } + +// NewInvoice created a new Invoice request to the user. +func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices *[]LabeledPrice) InvoiceConfig { + return InvoiceConfig{ + BaseChat: BaseChat{ChatID: chatID}, + Title: title, + Description: description, + Payload: payload, + ProviderToken: providerToken, + StartParameter: startParameter, + Currency: currency, + Prices: prices} +} |