Skip to main content

🚀 Start the bot

Before starting the bot, make to run the final setup commands

  1. npx prisma db push - Setup the database
  2. npm run build - Transpile the source

Now to start it, you need to run the command npm start (or node dist/index.js) in the terminal. You can also use a process manager like PM2.

Update the bot

If you're using git clone as way to obtain the source, the easiest way to update is by running the following commands:

git pull
npm run build

If there is any changes to the Prisma models or the database type, run the setup command again via npm run setup.

If you're using external database, you may encounter issues when trying to run git pull. To fix it:

  1. run git reset --hard HEAD
  2. Continue with the regular update process
  3. Follow the Prisma Setup to set the schema back

Keep the bot online 24/7

To keep the bot online 24/7, you can sponsor Sayrix on github from 1$/month and benefit from other advantages and, depending on your tier, get multiple hostings for cheap. Or host the bot on a Server/VPS using pm2.