Skip to content

Commit

Permalink
Support command: confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Oct 1, 2016
1 parent 7dd5ef0 commit 775b70a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,19 @@ func analyzeCommand(w http.ResponseWriter, r *http.Request) {
log.Errorf(c, "Error occurred at `buttons` command. mid:%v, err: %v", mid, err)
}

case "confirm":
template := linebot.NewConfirmTemplate(
"Do it?",
linebot.NewMessageTemplateAction("Yes", "Yes!"),
linebot.NewMessageTemplateAction("No", "No!"),
)
if _, err := bot.ReplyMessage(
token,
linebot.NewTemplateMessage("Confirm alt text", template),
).Do(); err != nil {
log.Errorf(c, "Error occurred at `confirm` command. mid:%v, err: %v", mid, err)
}

default:
//全員にブロードキャスト
senderName := getSenderName(c, bot, mid)
Expand Down

0 comments on commit 775b70a

Please sign in to comment.