<commit_before>'use strict';
var Alexa = require('alexa-sdk');
var staticValues = require("./staticValues.js");
var ValueParser = require("./valueParser.js");
var DiceRoller = require("./diceRoller.js");

var APP_ID = staticValues.APP_ID;
var SKILL_NAME = 'Dice Test';

exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;
    alexa.registerHandlers(handlers);
    alexa.execute();
};

var handlers = {
    'LaunchRequest': function () {
        if(this.event.request.intent != 'RollIntent'){
            this.emit(':ask', "What would you like to roll?", 'What would you like to roll?');
        } else {
            this.emit('RollDice');
        }
    },
    'Unhandled': function () {
        this.emit(':ask', 'What would you like to roll?', 'What would you like to roll?');
    },
    'RollIntent': function () {
        this.emit('RollDice');
    },
    'RollDice': function () {
        var slots = this.event.request.intent.slots;<commit_msg>Fallback for no dice command.<commit_after>'use strict';
var Alexa = require('alexa-sdk');
var staticValues = require("./staticValues.js");
var ValueParser = require("./valueParser.js");
var DiceRoller = require("./diceRoller.js");

var APP_ID = staticValues.APP_ID;
var SKILL_NAME = 'Dice Test';

exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;
    alexa.registerHandlers(handlers);
    alexa.execute();
};

var handlers = {
    'LaunchRequest': function () {
        if(this.event.request.intent != 'RollIntent'){
            this.emit(':ask', "What would you like to roll?", 'What would you like to roll?');
        } else {
            this.emit('RollDice');
        }
    },
    'Unhandled': function () {
        this.emit(':ask', 'What would you like to roll?', 'What would you like to roll?');
    },
    'RollIntent': function () {
        this.emit('RollDice');
    },
    'RollDice': function () {
        var slots = this.event.request.intent.slots;
        if(!slots.Dice.value){
            this.emit(':tell', 'There was an error in your question. Please specify what kind of die you want to roll. For example, boost or force. Please try again.');
        }
{'fraction_non_alphanumeric': 0.15583845478489902, 'fraction_numerical': 0.0, 'mean_word_length': 2.991243432574431, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6969011', 'n_tokens_mistral': 726, 'n_tokens_neox': 704, 'n_words': 184}