Merge pull request #10 from jqs7/master

add sendAudio duration
bot-api-6.1
Syfaro 2015-08-04 23:05:43 -04:00
commit 3fddac5396
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,7 @@ type PhotoConfig struct {
// AudioConfig contains information about a SendAudio request.
type AudioConfig struct {
ChatID int
Duration int
ReplyToMessageID int
ReplyMarkup interface{}
UseExistingAudio bool
@ -401,6 +402,9 @@ func (bot *BotAPI) SendAudio(config AudioConfig) (Message, error) {
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)
if err != nil {