Skip to content

Need to create a Timer #1

Description

@Web-Cam

I need to make a timer in Javascript. I would like the timer to be reset at the beginning of the function, and called at the end.


 'GetNewWordIntent': function () {
		 var wordInput = this.event.request.intent.slots.customWord.value;
		 
		 if(wordInput == null || wordInput === "undefined" || wordInput == ''|| wordinput = "i dont know " ||wordinput = "I give up "){ //Alexa doesnt understand the word, so User loses.
			this.emit('Unhandled'); //send to unhandled handler 
		 }
		 else{
			// Create speech output
			getNextWord(wordInput, (speechOutput) => {
				if(speechOutput == ''){
					this.emit('Unhandled');
				}
				else{
					//this.emit(':tellWithCard', speechOutput, this.t("SKILL_NAME"), speechOutput);
					this.emit(':ask', speechOutput + '. <break time="1s"/> say another, Im Ready!'); // Start timer
				}
			});
		}
    },

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions