I played around with the LINE Bot that I made earlier to return the parrot. https://qiita.com/endo-yuki/items/1a0ddfe857674be6044b With reference to the document, we added a process to return a message when receiving images, videos, and location information. https://pkg.go.dev/github.com/line/line-bot-sdk-go/linebot#TemplateAction
main.go
~~~~~~~~~~~~~~ (omitted) ~~~~~~~~~~~~~~~~~~~~~~
case *linebot.ImageMessage:
if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage("It's an image")).Do(); err != nil {
log.Print(err)
}
case *linebot.VideoMessage:
if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage("It's a video")).Do(); err != nil {
log.Print(err)
}
case *linebot.LocationMessage:
if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage("It's location information")).Do(); err != nil {
log.Print(err)
}
~~~~~~~~~~~~~~ (omitted) ~~~~~~~~~~~~~~~~~~~~~~