

The method also accepts a second parameter with additional options. This method is bp.http.getAxiosConfigForBot('bot123'): Promise.

It will automatically set the base URL for the request and the required headers to communicate with the specific bot. The Botpress SDK exposes a method to get the axios headers for a request. Consuming API Externally or From Another Module API Endpoint Īll modules are isolated and receive their own instance of bp. The only way to communicate with modules (or between them) is by using the API endpoint.Īll modules are isolated and receive their own instance of bp.

Please refer to the SDK Reference for information on the possible options. The definition is used by Botpress to setup your module. BotTemplate = [ĭesc : 'This is a demonstration bot to showcase some capabilities' For example, if you want to add an additional external file:Ĭonst botTemplates : sdk. When you override a property, you also remove the default settings that we've set, so we recommend adding them back when overriding. It is possible to override webpack parameters by adding a "webpack" property to the package.json file of your module.
NEW WORD GENERATOR BOT ARCHIVE
tgz archive containing your compiled module. Once your module is ready to be deployed, from your module's directory, run yarn build & yarn package. To regenerate the file for your module, you need to run yarn build from the module directory. This will process will recompile your module's code. Then, you can type cd modules/your-module and start a yarn watch process in another terminal. Restart server to apply backend changes and refresh your browser for UI changes.
NEW WORD GENERATOR BOT FULL
In order to have code changes automatically recompiled, you need to first run yarn cmd dev:modules (run yarn cmd default to get full documentation for other useful commands). Then you can build your module using yarn build. "package" : "./node_modules/.bin/module-builder package" "watch" : "./node_modules/.bin/module-builder watch" , "build" : "./node_modules/.bin/module-builder build" ,
