Add initial support for sendMediaGroup.

This commit is contained in:
Syfaro 2018-09-21 20:20:28 -05:00
parent 7ff5871e28
commit 898e79fe47
5 changed files with 91 additions and 1 deletions

View file

@ -519,6 +519,20 @@ func TestUpdatesChan(t *testing.T) {
}
}
func TestSendWithMediaGroup(t *testing.T) {
bot, _ := getBot(t)
cfg := tgbotapi.NewMediaGroup(ChatID, []interface{}{
tgbotapi.NewInputMediaPhoto("https://i.imgur.com/unQLJIb.jpg"),
tgbotapi.NewInputMediaPhoto("https://i.imgur.com/J5qweNZ.jpg"),
tgbotapi.NewInputMediaVideo("https://i.imgur.com/F6RmI24.mp4"),
})
_, err := bot.Send(cfg)
if err != nil {
t.Error(err)
}
}
func ExampleNewBotAPI() {
bot, err := tgbotapi.NewBotAPI("MyAwesomeBotToken")
if err != nil {