Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

iopa-bot-console

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iopa-bot-console

Console Bot Connector for IOPA Bot Framework

latest
Source
npmnpm
Version
1.4.2
Version published
Maintainers
1
Created
Source

IOPA
iopa-bot-console

NPM NPM

NPM

About

This repository contains a connector the for terminal console for the IOPA Bot Framework.

It is typically used only in localhost testing.

Example Usage

const iopaBotFramework = require('iopa-bot'),
      iopa = require('iopa'),
      BOT = iopaBotFramework.constants.BOT;

require('iopa-bot-console');

var app = new iopa.App();

app.use(iopaBotFramework.connectors.console);
app.use(iopaBotFramework);

// conversation schema -- change to program your bot

app.intent(BOT.INTENTS.Launch, { "utterances": ['/launch', '/open'] })

app.dialog('/', [BOT.INTENTS.Launch], function(context, next) {
    context.response.say("Hello!  Please converse with this bot. ").send();
});

app.intent('helloIntent', { "utterances": ['hi', 'hello', 'hey'] }, function(context, next) {
     context.response.say("Hello World").send();
})

app.dialog('/unknown', '*', function(context, next) {
    context.response.say("I don't know what you mean by " + context[BOT.Text]).send();
});

// build and listen to console

app.build();
app.listen();

License

Apache-2.0

API Reference Specification

IOPA

Keywords

iopa

FAQs

Package last updated on 08 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts