diff options
author | Wim <wim@42.be> | 2018-05-09 22:46:10 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2018-05-09 22:46:10 +0200 |
commit | 529b188164b7b0f18ca31a43410898e73a22ed03 (patch) | |
tree | 9b5e1df6c5a41e5518d26fbe8488f62a6c27dfd8 /vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go | |
parent | 8d307d8134a528d8e4a8f44ad98fccfd288acc42 (diff) | |
download | matterbridge-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/configs.go')
-rw-r--r-- | vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go | 80 |
1 files changed, 75 insertions, 5 deletions
diff --git a/vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go b/vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go index c0293ce2..574b3dd9 100644 --- a/vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go +++ b/vendor/github.com/go-telegram-bot-api/telegram-bot-api/configs.go @@ -676,7 +676,7 @@ type SetGameScoreConfig struct { Score int Force bool DisableEditMessage bool - ChatID int + ChatID int64 ChannelUsername string MessageID int InlineMessageID string @@ -689,7 +689,7 @@ func (config SetGameScoreConfig) values() (url.Values, error) { v.Add("score", strconv.Itoa(config.Score)) if config.InlineMessageID == "" { if config.ChannelUsername == "" { - v.Add("chat_id", strconv.Itoa(config.ChatID)) + v.Add("chat_id", strconv.FormatInt(config.ChatID, 10)) } else { v.Add("chat_id", config.ChannelUsername) } @@ -1038,8 +1038,8 @@ func (config DeleteMessageConfig) values() (url.Values, error) { // PinChatMessageConfig contains information of a message in a chat to pin. type PinChatMessageConfig struct { - ChatID int64 - MessageID int + ChatID int64 + MessageID int DisableNotification bool } @@ -1072,4 +1072,74 @@ func (config UnpinChatMessageConfig) values() (url.Values, error) { v.Add("chat_id", strconv.FormatInt(config.ChatID, 10)) return v, nil -}
\ No newline at end of file +} + +// SetChatTitleConfig contains information for change chat title. +type SetChatTitleConfig struct { + ChatID int64 + Title string +} + +func (config SetChatTitleConfig) method() string { + return "setChatTitle" +} + +func (config SetChatTitleConfig) values() (url.Values, error) { + v := url.Values{} + + v.Add("chat_id", strconv.FormatInt(config.ChatID, 10)) + v.Add("title", config.Title) + + return v, nil +} + +// SetChatDescriptionConfig contains information for change chat description. +type SetChatDescriptionConfig struct { + ChatID int64 + Description string +} + +func (config SetChatDescriptionConfig) method() string { + return "setChatDescription" +} + +func (config SetChatDescriptionConfig) values() (url.Values, error) { + v := url.Values{} + + v.Add("chat_id", strconv.FormatInt(config.ChatID, 10)) + v.Add("description", config.Description) + + return v, nil +} + +// SetChatPhotoConfig contains information for change chat photo +type SetChatPhotoConfig struct { + BaseFile +} + +// name returns the field name for the Photo. +func (config SetChatPhotoConfig) name() string { + return "photo" +} + +// method returns Telegram API method name for sending Photo. +func (config SetChatPhotoConfig) method() string { + return "setChatPhoto" +} + +// DeleteChatPhotoConfig contains information for delete chat photo. +type DeleteChatPhotoConfig struct { + ChatID int64 +} + +func (config DeleteChatPhotoConfig) method() string { + return "deleteChatPhoto" +} + +func (config DeleteChatPhotoConfig) values() (url.Values, error) { + v := url.Values{} + + v.Add("chat_id", strconv.FormatInt(config.ChatID, 10)) + + return v, nil +} |