Skip to content

NewMediaGroup , cannot send list video when use []tgbotapi.InputMediaVideo #427

Description

@radiaku

Hello I got error when send multiple file using []tgbotapi.InputMediaVideo as interface in newmediagroup

my code like this...

var listMediaVideoInput []tgbotapi.InputMediaVideo
for _, value := range dataListMediaVideo {
	var tempVideoInput = tgbotapi.NewInputMediaVideo(value)
	listMediaVideoInput = append(listMediaVideoInput, tempVideoInput)
}
msg = tgbotapi.NewMediaGroup(update.Message.Chat.ID, listMediaVideoInput)
bot.Send(msg)

I got error with this

.\main.go:226:9: cannot use tgbotapi.NewMediaGroup(update.Message.Chat.ID, listMediaVideoInput) (type tgbotapi.MediaGroupConfig) as type tgbotapi.MessageConfig in assignment
.\main.go:226:53: cannot use listMediaVideoInput (type []tgbotapi.InputMediaVideo) as type []interface {} in argument to tgbotapi.NewMediaGroup

Did I do something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions