@botpress/builtins

The built-in stuff such as Content Elements, Content Renderers and Actions for Botpress X+

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
9,254274Jun 22, 2021Nov 16, 2016Minified + gzip package size for @botpress/builtins in KB

Readme

This package provides you with several builtin content types that we found to be most commonly used. To make use of them you need to install that package and register builtins like this:

const { contentElements, contentRenderers, actions, setup } = require('@botpress/builtins')

await setup(bp)

// Register built-in content elements
await Promise.all(
  Object.values(contentElements)
    .map(schema => bp.contentManager.loadCategoryFromSchema(schema))
)

// Register renderers for the built-in elements
_.toPairs(contentRenderers).forEach(params => bp.renderers.register(...params))

// Register built-in actions
await bp.dialogEngine.registerActions(actions)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.