Merge pull request #10 from jqs7/master add sendAudio duration
Syfaro syfaro@foxpaw.in
Tue, 04 Aug 2015 23:05:43 -0400
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)