add sendAudio duration
Jqs7 7@jqs7.com
Wed, 05 Aug 2015 09:55:48 +0800
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
methods.go
→
methods.go
@@ -69,6 +69,7 @@
// AudioConfig contains information about a SendAudio request. type AudioConfig struct { ChatID int + Duration int ReplyToMessageID int ReplyMarkup interface{} UseExistingAudio bool@@ -400,6 +401,9 @@ v.Add("chat_id", strconv.Itoa(config.ChatID))
v.Add("audio", config.FileID) if config.ReplyToMessageID != 0 { v.Add("reply_to_message_id", strconv.Itoa(config.ReplyToMessageID)) + } + if config.Duration != 0 { + v.Add("duration", strconv.Itoa(config.Duration)) } if config.ReplyMarkup != nil { data, err := json.Marshal(config.ReplyMarkup)