public override async Task <Tuple <ICard, IOutputSpeech, Reprompt> > HandleAsync(Intent intent) { var volumeSlot = intent.Slots["volume"]; int volume = 0; if (!int.TryParse(volumeSlot.Value, out volume)) { await _notifier.NotifyAsync(AlexaMessage.CreateMessage(Commands.SetVolumeCommand, new Dictionary <string, string> { { "Volume", volume.ToString() } })); return(ResponseBuilder.BuildResponse("Sorry, you can only set the volume between 0 and 10.", "Chromecast", "Try using 'set volume to 5'")); } else { return(ResponseBuilder.BuildResponse($"Volume set to {volume}", $"Chromecast - Volume set to {volume}")); } }
public override async Task <Tuple <ICard, IOutputSpeech, Reprompt> > HandleAsync(Intent intent) { await _notifier.NotifyAsync(AlexaMessage.CreateMessage(Commands.StopCommand)); return(ResponseBuilder.BuildResponse("Ok", "ChromeCast - Video stopped")); }