Code Monkey home page Code Monkey logo

sactive-bot's Introduction

SActive Bot

😈 An extensible chat bot framework.

Build Status NPM version NPM Download License

Create a Mattermost bot:

Create a Mattermost bot

Chat with bot:

Chat with bot

Requirements

  • NodeJs version v7.9+

Installation

Clone source code form GitHub

# clone
git clone [email protected]:shipengqi/sactive-bot.git

# install dependencies
cd sactive-bot
yarn install

# link
npm link

NPM or Yarn

npm install sactive-bot -g

# or
yarn global add sactive-bot

Features

  • WeChat Bot
  • Slack Bot
  • Mattermost Bot
  • Microsoft Teams Bot
  • Support create conversation for bot
  • Misspelling
  • Help for bot
  • Conversation Manager
  • Command API call
  • Authentication
  • Support integrate your own adatper

Documentations

TODO

  • Unit Test
  • Command receiver authentication
  • Crypto all sensitive information
  • Render card
  • Docker version, kubernetes version

References

sactive-bot's People

Contributors

abdullahtariq91 avatar shipengqi avatar yubaobei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sactive-bot's Issues

robot.$.registerAPICallback 在抛出错误后返回值不会刷新

在example.js中的示例上进行修改:

 robot.$.registerAPICallback('example', 'exampleforapicall', info => {
	  if(info.body.room==='testRoom'){
		robot.messageRoom('testRoom', 'testMessage');
		return Promise.resolve(info.body);
	  }else{
		throw new Error('Error: invalid room.');
	  }
  });

在Postman中发送正确的消息,Body:

{"room":"testRoom","message":"testMessage"}

频道正确发送消息,Postman收到返回值:

{
    "code": 200,
    "msg": "success.",
    "data": {
        "room": "testRoom",
        "message": "testMessage"
    }
}

当发送的消息为错误的消息,Body:

{"room":"noRoom","message":"testMessage"}

Postman收到返回值:

{
    "code": 500,
    "msg": "Error: invalid room."
}

在发送以上错误消息之后,重新发送正确的消息,Body:

{"room":"testRoom","message":"testMessage"}

机器人会执行正确的流程发送频道消息,但Postman收到返回值仍然是:

{
    "code": 500,
    "msg": "Error: invalid room."
}

重新启动机器人后,Postman中收到的返回值会恢复正确。

msg.message.user.mm.roles.startsWith('system') - undefined roles

Hey there!

Great repo! Thanks a lot!
I get an error from the filter_middleware.

error: TypeError: Cannot read property 'startsWith' of undefined
    at filterMiddleware (/Users/Rtsouroplis/Documents/GitHub/sactive-bot/lib/middlewares/filter_middleware.js:48:72)
    at /Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/hubot/src/middleware.coffee:36:24
    at /Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/async/lib/async.js:269:13
    at iterate (/Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/async/lib/async.js:146:13)
    at Object.async.eachSeries (/Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/async/lib/async.js:162:9)
    at Object.async.reduce (/Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/async/lib/async.js:268:15)
    at /Users/Rtsouroplis/Documents/GitHub/sactive-bot/node_modules/hubot/src/middleware.coffee:49:13
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

It doesn't get anything back from msg.message.user.mm.roles as it seems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.