botbuilder-typetalk
v0.4.3
Published
Typetalk bot connector for Microsoft BotBuilder.
Readme
botbuilder-typetalk
Typetalk bot connector for Microsoft BotBuilder.
Get started
- Install botbuilder-typetalk
npm install botbuilder-typetalk --save- Create .env file.
.env:
TYPETALK_CLIENT_ID='DEADBEEF' # see http://developer.nulab-inc.com/docs/typetalk/auth#client
TYPETALK_CLIENT_SECRET='FACEFEED'
TYPETALK_ROOMS='2321,2684' # comma separated- Initialize Typetalk Bot.
index.js:
'use strict'
require('dotenv').config()
const TypetalkBot = require('botbuilder-typetalk').TypetalkBot
const bot = new TypetalkBot({
clientId: process.env.TYPETALK_CLIENT_ID,
clientSecret: process.env.TYPETALK_CLIENT_SECRET,
rooms: process.env.TYPETALK_ROOMS
})
bot.add('/', (session) => {
session.send('Hello!')
}
bot.listen()- Run bot with typetalk adapter.
node indexLet's try sample!
- Get botbuilder-typetalk project.
git clone [email protected]:nulab/botbuilder-typetalk.git
cd ./botbuilder-typetalk- Create .env file.
TYPETALK_CLIENT_ID='DEADBEEF' # see http://developer.nulab-inc.com/docs/typetalk/auth#client
TYPETALK_CLIENT_SECRET='FACEFEED'
TYPETALK_ROOMS='2321,2684' # comma separated- Install dependencies.
npm install- Run sample bot.
node sampleLicense
MIT License
- http://www.opensource.org/licenses/mit-license.php
