Running your bot 24/7
Running your bot on an external VPS
By now you may have noticed that when you close DBM your bot shuts down. This tutorial will explain how to export your bot to run in a command terminal.
Running your bot locally with cmd
- Open project directory
- Click into the address bar
- At the beginning type "cmd" and hit enter (this will open a cmd prompt in this folder)
- type
node bot.js
Use something like NODEMON to run the bot
node bot.js
will have to be restarted every time you make changes. You can use Nodemon to do this automatically
- Install nodemon with
npm i -g nodemon
- Follow steps 1-3 from above, but instead of using
node bot.js
typenodemon --inspect --watch actions --watch data/commands.json--watch data/events.json --watch node_modules --watch js bot.js