Commit 078125c1 authored by Tammo Ronke's avatar Tammo Ronke

some refactoring :/

parent 0d6f3606
[ignore]
[include]
[libs]
[lints]
[options]
[strict]
var restify = require("restify");
var builder = require("botbuilder");
var botbuilder_azure = require("botbuilder-azure");
const restify = require("restify");
const builder = require("botbuilder");
const botbuilder_azure = require("botbuilder-azure");
var rootDialog = require("./dialogs/root");
const rootDialog = require("./dialogs/root");
var durationPrompt = require("./prompts/durationPrompt");
var topicPrompt = require("./prompts/topicPrompt");
const durationPrompt = require("./prompts/durationPrompt");
const topicPrompt = require("./prompts/topicPrompt");
// Setup Restify Server
var server = restify.createServer();
let server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function() {
console.log("%s listening to %s", server.name, server.url);
});
// Create chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
let connector = new builder.ChatConnector({
appId: process.env.MicrosoftAppId,
appPassword: process.env.MicrosoftAppPassword,
openIdMetadata: process.env.BotOpenIdMetadata
......@@ -23,17 +23,16 @@ var connector = new builder.ChatConnector({
// Listen for messages from users
server.post("/api/messages", connector.listen());
var tableName = "botdata";
var azureTableClient = new botbuilder_azure.AzureTableClient(
let tableName = "botdata";
let azureTableClient = new botbuilder_azure.AzureTableClient(
tableName,
process.env["AzureWebJobsStorage"]
);
var tableStorage = new botbuilder_azure.AzureBotStorage(
let tableStorage = new botbuilder_azure.AzureBotStorage(
{ gzipData: false },
azureTableClient
);
var bot = new builder.UniversalBot(connector);
let bot = new builder.UniversalBot(connector);
server.post("/api/messages", connector.listen());
/*
......
var builder = require("botbuilder");
const builder = require("botbuilder");
module.exports = [
(session, args, next) => {
......
var builder = require("botbuilder");
const builder = require("botbuilder");
const GSearch = require("../utils/gsearch");
module.exports = [
......
var builder = require("botbuilder");
const builder = require("botbuilder");
const dialog = recognizer => {
var dialog = new builder.IntentDialog({
let dialog = new builder.IntentDialog({
recognizers: [recognizer]
});
......
var builder = require("botbuilder");
const builder = require("botbuilder");
const GSearch = require("../utils/gsearch");
module.exports = [
......
var builder = require("botbuilder");
var suggestionStore = require("../store/suggestion");
const builder = require("botbuilder");
const suggestionStore = require("../store/suggestion");
module.exports = [
(session, args, next) => {
......
var request = require("sync-request");
const request = require("sync-request");
const cheerio = require("cheerio");
const getImgs = imgTopics => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment