add sendAudio duration
parent
96a104444e
commit
6bf83a8185
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue