0.4.3 • Published 4 years ago

botbuilder-typetalk v0.4.3

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

botbuilder-typetalk

Build Status Coverage Status npm version

Typetalk bot connector for Microsoft BotBuilder.

Get started

  1. Install botbuilder-typetalk

    npm install botbuilder-typetalk --save
  2. 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
  3. 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()
  4. Run bot with typetalk adapter.

    node index

Let's try sample!

  1. Get botbuilder-typetalk project.

    git clone git@github.com:nulab/botbuilder-typetalk.git
    cd ./botbuilder-typetalk
  2. 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
  3. Install dependencies.

    npm install
  4. Run sample bot.

    node sample

License

MIT License

0.4.3

4 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago