add sendAudio duration
parent
96a104444e
commit
6bf83a8185
|
@ -69,6 +69,7 @@ type PhotoConfig struct {
|
||||||
// AudioConfig contains information about a SendAudio request.
|
// AudioConfig contains information about a SendAudio request.
|
||||||
type AudioConfig struct {
|
type AudioConfig struct {
|
||||||
ChatID int
|
ChatID int
|
||||||
|
Duration int
|
||||||
ReplyToMessageID int
|
ReplyToMessageID int
|
||||||
ReplyMarkup interface{}
|
ReplyMarkup interface{}
|
||||||
UseExistingAudio bool
|
UseExistingAudio bool
|
||||||
|
@ -401,6 +402,9 @@ func (bot *BotAPI) SendAudio(config AudioConfig) (Message, error) {
|
||||||
if config.ReplyToMessageID != 0 {
|
if config.ReplyToMessageID != 0 {
|
||||||
v.Add("reply_to_message_id", strconv.Itoa(config.ReplyToMessageID))
|
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 {
|
if config.ReplyMarkup != nil {
|
||||||
data, err := json.Marshal(config.ReplyMarkup)
|
data, err := json.Marshal(config.ReplyMarkup)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue