Skip to content

Instantly share code, notes, and snippets.

@puzanov
Last active January 19, 2017 09:10
Show Gist options
  • Select an option

  • Save puzanov/8356f54cc78dbdccfa582a0cf8aee195 to your computer and use it in GitHub Desktop.

Select an option

Save puzanov/8356f54cc78dbdccfa582a0cf8aee195 to your computer and use it in GitHub Desktop.
Telegram Bot Audio Upload
msg := tgbotapi.NewAudioUpload(ChatID, "tests/audio.mp3")
msg.Title = "TEST"
msg.Duration = 10
msg.Performer = "TEST"
msg.MimeType = "audio/mpeg"
msg.FileSize = 688
_, err := bot.Send(msg)
if err != nil {
t.Error(err)
t.Fail()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment