The default export for the main npm module does not start the bot, so it can be
required and started manually after manual configuration / manipulation.
However, in most cases it will be configured from command line args and started
immediately, loading scripts automatically. In that case, e.g. for a Glitch or
Heroku instance as a node package requiring bBot, the entry point might be a
script that calls require('bbot/dist/start') or executes it directly from
node, with node -r dotenv/config node_modules/bbot/dist/start.
Need to test this in different production environments to see if it's effective.
NB: Glitch actually loads environment by default, so the start script would just
need node node_modules/bbot/dist/start with a scripts dir.
The default export for the main npm module does not start the bot, so it can be required and started manually after manual configuration / manipulation. However, in most cases it will be configured from command line args and started immediately, loading scripts automatically. In that case, e.g. for a Glitch or Heroku instance as a node package requiring bBot, the entry point might be a script that calls
require('bbot/dist/start')
or executes it directly from node, withnode -r dotenv/config node_modules/bbot/dist/start
.Need to test this in different production environments to see if it's effective.
NB: Glitch actually loads environment by default, so the start script would just need
node node_modules/bbot/dist/start
with a scripts dir.See https://github.com/Amazebot/bbot/blob/master/src/start.spec.ts#L5