Started on making a skype bot with the node API

This commit is contained in:
Daniel Løvbrøtte Olsen 2016-08-11 20:41:23 +02:00
parent 925e55b741
commit 92cf8e10f3
3 changed files with 41 additions and 1 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
blomzt\config.php
blomzt\config.php
node_modules

24
dodsorfas/Skypebot/app.js Normal file
View File

@ -0,0 +1,24 @@
var restify = require('restify');
var builder = require('botbuilder');
// Bot setup
// restify setup
var 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 bot
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
// Bot Dialogs
bot.dialog('/', function(session) {
session.send("Hello World");
});

View File

@ -0,0 +1,15 @@
{
"name": "skypebot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "",
"dependencies": {
"botbuilder": "^3.2.3",
"restify": "^4.1.1"
}
}