Bots Development Environment Setup
Requirements
Developing bots on RocketChat requires you to get and customize our boilerplate code. To do that, you need to have the following on your machine.
Bot Configuration
Regardless of bot type, the Rocket.Chat SDK requires you to create a configuration with some variables for your environment. This configuration can be stored in a .env
file, for local development, for example. In production, they would need to be set on server startup.
Bots Environmental variables
The following is a list of all the environmental variables you can use in your project.
Variables marked with an asterisk (*
) are mandatory.
Common Set of Variables
The common set for the majority of bots is to listen and respond to direct messages and all new public channels and private groups:
RESPOND_TO_DM=true
ROCKETCHAT_ROOM=''
Note that you must add the bot's user as a member of the new private group(s) before it will respond.
Last updated