Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 18, 2020. It is now read-only.

Broid Kit Middleware for Botpress.

License

NotificationsYou must be signed in to change notification settings

broidHQ/broid-kit-botpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npmnodebithoundbithoundscorensp-checked

Broid Kit Botpress

Broid Kit Botpress is abroid-kit middlewares that integratesbotpress withBroid Integrations which allows you to leverage the largest collection of messaging channels integrated in a single framework.

This middleware supports onlyIncoming messages (communication channel -> broid -> botpress),Outgoing is not supported (there is no way to pass messages from botpress -> broid -> communication channel, the only option is broid -> communication channel).

Connect your application to multiple messaging channels using W3C Open standards.

gitterjoin-slack

Quick Example

constpath=require("path");constBot=require("@broid/kit");constBroidDiscord=require("@broid/kit-botpress");constBroidMessenger=require("@broid/messenger");constBroidSlack=require("@broid/slack");constbot=newBot({logLevel:"info",http:{host:"0.0.0.0",port:8080,}});bot.use(newBroidSlack(<...options>));bot.use(new BroidDiscord(<...options>));bot.use(new BroidMessenger(<...options>));bot.use(new BroidKitBotpress({botpressPath:path.join(__dirname,'botpress')}));// Listening for public starting by `hello`bot.hear("hello.*", "Group")  .subscribe((data) =>{console.log("Data:",JSON.stringify(data,null,2));// Reply to the messagebot.sendText("Hi, How are you?",data.raw);});

Documentation

Quick Start

  1. Create a new node project
$ npm init
  1. Install and initialize a new botpress project
$ npm -g i botpress$ mkdir botpress&&cd botpress&& botpress init

Take a coffee ;)

  1. Installbroid-kit
$cd ..&& npm i --save @broid/kit
  1. Install all the broid integrations you need. You can see the full listhere
$ npm i --save @broid/skype @broid/slack @broid/messenger @broid/discord
  1. Installbroid-kit-botpress
$ npm i --save @broid/kit-botpress
  1. Copy past the basic code and play with it!
constpath=require("path");constBot=require("@broid/kit");constBroidSLack=require("@broid/slack");constBroidDiscord=require("@broid/kit-botpress");constBroidMessenger=require("@broid/messenger");constBroidKitBotpress=require("@broid/kit-botpress");constbot=newBot({logLevel:"info",http:{host:"0.0.0.0",port:8080,}});bot.use(newBroidSlack(<...options>));bot.use(new BroidDiscord(<...options>));bot.use(new BroidMessenger(<...options>));bot.use(new BroidKitBotpress({botpressPath:path.join(__dirname,'botpress')}));bot.hear('.*', 'Person')  .subscribe((data) =>{console.log("hear data",data);});

[8]ページ先頭

©2009-2025 Movatter.jp