Started on making a skype bot with the node API
This commit is contained in:
parent
925e55b741
commit
92cf8e10f3
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
blomzt\config.php
|
||||
node_modules
|
24
dodsorfas/Skypebot/app.js
Normal file
24
dodsorfas/Skypebot/app.js
Normal 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");
|
||||
});
|
15
dodsorfas/Skypebot/package.json
Normal file
15
dodsorfas/Skypebot/package.json
Normal 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"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user