Code Monkey home page Code Monkey logo

bolt-javascript-bot's Introduction

Bolt Javascript Bot for Symphony

A very simple javascript bot meant to be used as a base template to create more complicated chat bots on Symphony.

Requirements

  • Idea of what you want the bot to do!
  • Your own pod
  • API Agent Library installed either on the cloud or on-premise
  • A Service Account for the Bot that can be created in your pod's Admin Portal
  • Security Certificates for Bot Authentication, with one of the certificate upload to the Admin Portal^
  • Symphony REST API Documentation Access @ https://developers.symphony.com
  • NodeJS/NPM installed. This is only tested to work on v6.9.1

^ (certificates should be obtained from your internal PKI infrastructure, or refer to Certificate Generator for Windows PDF Instructions for more information)

Instructions

  1. Run npm install to install all the node modules dependencies.

  2. Place your .pem and .p12 certificates in the /certs folder

  3. In the config.js file, fill in your own pod and agent API library endpoints (POD_URL, AGENT_URL, AGENT_URL2, SESSION_ENDPOINT, KEY_MANAGER_ENDPOINT)

  4. In the same config.js file, fill in the filepath to the appropriate certificate and certificate key as well as the certificate passphrase (CERT_FILE_PATH, CERT_KEY_FILE_PATH, CERT_PASSPHRASE)

  5. You may now run npm start. This runs the server that can be accessed on localhost:4000

  6. The script will attempt to authenticate to your pod as well as your key manager to obtain both the pod session token as well as a key manager token.

  7. You should be able to now search for your bot (Bolt) and chat with it either in an IM or CHATROOM! It should have an online status.

  8. By default, the bot is filtering for /bolt and /bolt $TICKER in your chat message. You can modify this and more in the parseMessage function in api.js

Credits

Bolt is created by Jeff Lam Tian Hung. It can be used and modified freely, with no expectation of any support whatsoever.

Contributing

  1. Fork it (https://github.com/symphonyoss/bolt-javascript-bot/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Read our contribution guidelines and Community Code of Conduct
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request

License

The code in this repository is distributed under the Apache License, Version 2.0.

Copyright (c) 2019 Symphony LLC

bolt-javascript-bot's People

Contributors

jefflam avatar

Watchers

 avatar

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.