question

田中翔平 avatar image
田中翔平 asked

カウントをするコードについて

const speakOutput = 'こんにちは、継続カウントへようこそ。継続の回数をカウントします。';
const attr = handlerInput.attributesManager.getSessionAttributes();
attr.count = 0;
return handlerInput.responseBuilder
.speak(speakOutput)
.reprompt(speakOutput)
.getResponse();

このコードだと何と言っても「継続の回数は1回です」「継続の回数は2回です」となるのですが、

勉強の回数、運動の回数などそれぞれの回数をカウントする場合、どのようなコードとなるのか教えて下さい。

alexa skills
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers