npm
, but feel free to use the package manager of your choice like yarn
or pnpm
.bot.definition.ts
: Contains the bot definition. It exports a data structure that describes your bot—what it can do, and how it can be used. This includes the bot’s actions, events. The definition also allows declaring your bot integration dependencies. Keep reading this documentation to learn about all the concepts you can define in this file.
src/index.ts
: Contains the bot implementation. It exports a data structure that implements what was defined in the bot definition. Keep reading this documentation to learn about the available callbacks and handlers you can implement.
.botpress/
: Contains the bot output, generated by the build command. It includes typings to help you implement your bot, and bundled JavaScript used to execute it. You can explore its contents, but avoid importing from nested files or folders, as its structure may change. Everything meant to be imported is available from the root of this folder.
package.json
, tsconfig.json
: As with any Node.js TypeScript project, these files contain your package’s metadata and dependencies, and the TypeScript configuration. The tsconfig.json
file is preconfigured to offer the best experience with the Botpress SDK. Run npm run check:type
to check for typing errors.
bot.definition.ts
file and add the following code:
src/index.ts
file and add the following code:
--create-new-bot
flag will create a new bot in your workspace. If you want to deploy to an existing bot, you can omit this flag. The CLI will prompt you for the bot in which you want to deploy.
After deploying, go to the Dashboard. You should see your bot listed there.