`**` Set to `rocketchat` to enable this adapter (or pass as launch argument) | `RESPOND_TO_LIVECHAT` | If the bot should respond in livechat rooms | | `RESPOND_TO_EDITED` | If the bot should reply / re-reply to edited messages | | `RESPOND_TO_DM` | If the bot can respond privately or only in the open | | `LISTEN_ON_ALL_PUBLIC` | Whether the bot should be listening everywhere | | `ROCKETCHAT_ROOM` | The default room/s for the bot to listen in to | | `ROCKETCHAT_PASSWORD`* | Matching the credentials setup in Rocket.Chat | | `ROCKETCHAT_USER`* | Name in the platform (bot user must be created first) | | `ROCKETCHAT_URL`* | Local Rocketchat address (start before the bot) | | `HUBOT_ADAPTER`** | The platform adapter package to require on loading | | `HUBOT_HTTPD` | If the bot needs to listen to or make HTTP requests | | `HUBOT_LOG_LEVEL` | The minimum level of logs to output | | `HUBOT_ALIAS` | An alternate name for the bot to respond to | | `HUBOT_NAME` | The programmatic name for listeners | They would need to be set on server startup. In local development, the following can be set in an `.env` file. `bin/hubot -a rocketchat` - will install dependencies and run the bot with this Using the boilerplate example, to start the bot in production, use Or via the package scripts locally using `npm run local` or `yarn local` The bot can then be executed using a bin file in production, ( ). The Rocket.Chat adapter and Coffeescript for its execution. The boilerplate is essentially just a simple node package that requires Hubot, Note that for bots email, a common workaround to avoid creating multipleĪccounts is to use gmail addresses, e.g. Use these credentials in the bot's environment `ROCKETCHAT_USER` and Disable *Join default channels* recommended, to avoid accidental listening Select `bot` from role selection and click *Add Role*Ħ. Enter *Name*, *Username*, *Email* (tick verified) and *Passwword*ĥ. From **Administration** > **Users** menuģ. If you want to include your own custom scripts you can by doing:Īn admin user is required to create the account for the bot to login to.ġ. e EXTERNAL_SCRIPTS=hubot-pugme,hubot-help \ You can quickly spin up a docker image with: We have a couple of ways for you to get up and started with the Rocket.Chat adapter. # Getting your bot connected to Rocket.Chat The following instructions are ONLY for v2.x.x of the adapter. If you are writing CoffeeScript bots, need Hubot 2.x and v1.x.x or v0.x.x of the adapter, please see ( #For-v1.x.x-and-v0.x.x-of-the-Adatper). # For v2.x.x of the Adapter (Hubot v3 and ES6 support) You can easily extend these scripts for your custom application. We already have many scripts that add webhook events and access GitHub/GitLab APIs. Make sure you visit the ( ) project before starting. If you want to integrate Rocket.Chat with GitHub or GitLab. (releases between 0.35.0 and 0.37.1 are not recommended for hubot operations) If you are using Rocket.Chat 0.35.0 or earlier, please use v0.1.4 of the adapter. Yes, you should be able to continue using v1.x.x adapter and CoffeeScript bots with the most up-to-date version of the server. V1.x.x versions of the adapter is only compatible with 0.37.1 and higher of Rocket.Chat Server. * The latest ES6 syntax in NodeJS 8, including the popular async-await, is fully supported * ( ) or later is required for operations * Yeoman generator support is discontinued, you should start your project with our ( ) * CoffeeScript BOTs will no longer be supported, all new bot scripts should be written in NodeJS 8 compatible JavaScript **BREAKING CHANGES:** v2.x.x contains major breaking changes. Feel free to join us in the ( ) channel to discuss hubot, and any scripts you might be working on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |