all repos — telegram-bot-api @ 3fddac5396763a534e83a9389d243b2d0601ce9e

Golang bindings for the Telegram Bot API

Merge pull request #10 from jqs7/master

add sendAudio duration
Syfaro syfaro@foxpaw.in
Tue, 04 Aug 2015 23:05:43 -0400
commit

3fddac5396763a534e83a9389d243b2d0601ce9e

parent

3c9ed7cfe2f376ab7988c2eecb083dc4f5a2266b

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M methods.gomethods.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)