summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-05-09 22:46:10 +0200
committerWim <wim@42.be>2018-05-09 22:46:10 +0200
commit529b188164b7b0f18ca31a43410898e73a22ed03 (patch)
tree9b5e1df6c5a41e5518d26fbe8488f62a6c27dfd8 /vendor/github.com/go-telegram-bot-api/telegram-bot-api/helpers.go
parent8d307d8134a528d8e4a8f44ad98fccfd288acc42 (diff)
downloadmatterbridge-msglm-529b188164b7b0f18ca31a43410898e73a22ed03.tar.gz
matterbridge-msglm-529b188164b7b0f18ca31a43410898e73a22ed03.tar.bz2
matterbridge-msglm-529b188164b7b0f18ca31a43410898e73a22ed03.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.go40
1 files changed, 39 insertions, 1 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 132d957e..b5480ead 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
@@ -19,6 +19,13 @@ func NewMessage(chatID int64, text string) MessageConfig {
}
}
+func NewDeleteMessage(chatID int64, messageID int) DeleteMessageConfig {
+ return DeleteMessageConfig{
+ ChatID: chatID,
+ MessageID: messageID,
+ }
+}
+
// NewMessageToChannel creates a new Message that is sent to a channel
// by username.
//
@@ -641,7 +648,7 @@ func NewCallbackWithAlert(id, text string) CallbackConfig {
}
}
-// NewInvoice created a new Invoice request to the user.
+// NewInvoice creates 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},
@@ -653,3 +660,34 @@ func NewInvoice(chatID int64, title, description, payload, providerToken, startP
Currency: currency,
Prices: prices}
}
+
+// NewSetChatPhotoUpload creates a new chat photo uploader.
+//
+// chatID is where to send it, file is a string path to the file,
+// FileReader, or FileBytes.
+//
+// Note that you must send animated GIFs as a document.
+func NewSetChatPhotoUpload(chatID int64, file interface{}) SetChatPhotoConfig {
+ return SetChatPhotoConfig{
+ BaseFile: BaseFile{
+ BaseChat: BaseChat{ChatID: chatID},
+ File: file,
+ UseExisting: false,
+ },
+ }
+}
+
+// NewSetChatPhotoShare shares an existing photo.
+// You may use this to reshare an existing photo without reuploading it.
+//
+// chatID is where to send it, fileID is the ID of the file
+// already uploaded.
+func NewSetChatPhotoShare(chatID int64, fileID string) SetChatPhotoConfig {
+ return SetChatPhotoConfig{
+ BaseFile: BaseFile{
+ BaseChat: BaseChat{ChatID: chatID},
+ FileID: fileID,
+ UseExisting: true,
+ },
+ }
+}