repacked bundle

This commit is contained in:
2018-07-22 13:36:43 +05:30
parent d09a5e6b95
commit ac9391f9f9
11 changed files with 685 additions and 890 deletions

View File

@@ -1,4 +1,5 @@
const config = require('./config.js');
const $configBot = require('./config.js');
const $config = require('./../config.js');
const Microbot = require("./../microbot-ops.js");
const app = new Microbot();
const DomManipulator = require('./../dom-ops.js');
@@ -6,7 +7,7 @@ const domManipulator = new DomManipulator();
module.exports = class Recast {
constructor() {
this.recastToken = config.recasttoken;
this.recastToken = $configBot.recasttoken;
this.requestUrl = "https://api.recast.ai/v2/request";
}
@@ -27,6 +28,7 @@ module.exports = class Recast {
response.json().then(function(body) {
bodyRelevant = body.results;
intent = bodyRelevant.intents[0]["slug"];
$('#' + $config.costants.hiddenIntentFieldId).val(intent)
if(intent !== undefined) {
domManipulator.displayIntentBox(intent);
domManipulator.showWidget(intent);