Merge pull request #388 from rusq/v2

Add Caption parameter to Voice structure
pull/425/head
demget 3 years ago committed by Demian
parent b6706e784c
commit 6785a1e3bd

@ -155,7 +155,8 @@ type Voice struct {
Duration int `json:"duration"`
// (Optional)
MIME string `json:"mime_type,omitempty"`
Caption string `json:"caption,omitempty"`
MIME string `json:"mime_type,omitempty"`
}
// VideoNote represents a video message (available in Telegram apps

@ -213,6 +213,7 @@ func (a *Animation) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, erro
func (v *Voice) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) {
params := map[string]string{
"chat_id": to.Recipient(),
"caption": v.Caption,
}
b.embedSendOptions(params, opt)

Loading…
Cancel
Save