all repos — telegram-bot-api @ 6bf83a81850e31b0f3068def45a1d24ceaab968c

Golang bindings for the Telegram Bot API

add sendAudio duration
Jqs7 7@jqs7.com
Wed, 05 Aug 2015 09:55:48 +0800
commit

6bf83a81850e31b0f3068def45a1d24ceaab968c

parent

96a104444e0fd64c3a220b763abf57386a7d909e

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)