Add initial support for sendMediaGroup.
This commit is contained in:
parent
7ff5871e28
commit
898e79fe47
5 changed files with 91 additions and 1 deletions
14
bot_test.go
14
bot_test.go
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue