Giter Site home page Giter Site logo

lupael / botkit-starter-rocketchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rocketchat/botkit-starter-rocketchat

0.0 1.0 0.0 325 KB

A starter kit for building a custom Rocket.Chat bot with Botkit Studio

Home Page: botkit-starter-rocketchat-git-master.lupael.vercel.app

License: MIT License

JavaScript 90.71% Shell 9.29%

botkit-starter-rocketchat's Introduction

botkit-starter-rocketchat

A starter kit for building a custom Rocket.Chat bot with Botkit Studio.

This is a work in progress for the two communities to collaborate on to achieve the integration proposed in this issue on the main Rocket.Chat project: RocketChat/Rocket.Chat#9937

It follows the example of other Botkit starter projects, like https://github.com/howdyai/botkit-starter-slack to provide a starting point for building bots for teams and communities on Rocket.Chat

This project use the botkit-rocketchat-connector dependency to provide the controller access to Rocket.Chat message streams, methods and events.

When complete, this readme should be updated with usage and configuration docs, to help new users to either Botkit or Rocket.Chat with the end to end concerns.

It may also end up being moved to be maintained under the howdyai organisation, depending on what makes sense for the contributors doing most of the maintenance.

Overview

The botkit-starter-rocketchat use the botkit-rocketchat-connector, this repository it's a easy way to configure and use botkit inside RocketChat.

This is how your bot will work:

botkit_example

The image bellow exemplify this integration.

Integration

Usage

  • Clone this repository:

git clone https://github.com/RocketChat/botkit-starter-rocketchat

  • Install dependencies:

npm install

  • Update .env file with your configuration:
studio_token=<BOTKIT STUDIO TOKEN>
ROCKETCHAT_URL=<ROCKETCHAT HOST>
ROCKETCHAT_USER=<BOTKIT USER NAME>
ROCKETCHAT_PASSWORD=<BOTKIT USER PASS>
ROCKETCHAT_USE_SSL=<SSL USAGE>
ROCKETCHAT_ROOM=<ROCKETCHAT CHANNEL>
MENTION_ROOMS=<CHANNEL THAT THe BOT WILL ONLY ANSWER WHEN MENTIONED>
RESPOND_TO_DM=<ENABLE BOT TO RESPOND TO DIRECT MESSAGES>
RESPOND_TO_LIVECHAT=<ENABLE BOT TO RESPOND TO LIVE CHAT>
RESPOND_TO_EDITED=<ENABLE BOT TO RESPOND TO EDITED MESSAGES>

See the section to Configure RocketChat.

  • Run your starter:

node .

Configure RocketChat

To have your local instance of RocketChat you just need to run:

  • Up RocketChat container

docker-compose up mongo rocketchat

  • Create your user.

  • Create a bot with the same BOT_USER and BOT_PASS of the .env file.

Go to Administration -> Users -> + (in the right corner) -> insert the Name, Username, Email, Password and add the role bot than click in Save.

  • Send a message in GENERAL channel or the channel that you configurated at ROOMS in the .env file.

botkit-starter-rocketchat's People

Contributors

arthurtemporim avatar timkinnane avatar diegodorgam avatar lupael avatar

Watchers

James Cloos 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.