Hosting on Windows
This page assumes that you have already completed the Pre-Installation Steps If you haven not yet completed the pre-installation steps, please go back and complete them because the bot cannot function without them.
Clone the source code and move into the bot's directory.
1. Install Dependencies
As Windows does not come with a great package manager like most Linux distros or brew on MacOS, you will need to manually install some dependencies.
2. Download BrayanBot from one of our official sources
3. Extract the zip you have downloaded
If you are using WinRar or 7zip, you should have an option to extract the zip when you right click on the file.
4. Move into the BrayanBot Directory
- Using Powershell
- Using VSCode
Powershell is Windows' own command line interface. It is a very powerful tool that allows you to run commands in a terminal.
# Move to BrayanBot directory
If you have chosen VSCode over powershell, you can right click the BrayanBot folder and open it with VSCode; this will allow you to edit your configuration files as well as use the built-in terminal to run necessary commands
4. Copy the example config to the main
BrayanBot needs config.yml to be in the BrayanBot directory. We will copy example.config.yml to the main config.yml file and insert our Bot's token.
# Copy example.config.yml to config.yml
copy example.config.yml config.yml
# or if you would like to simply rename the file
move example.config.yml config.yml
You can also do this on VSCode by right clicking the file and copying it. Or you can rename the file before you insert the token.
5. Install node modules & Start BrayanBot
- pnpm (recommended)
npm install && npm run start --skip-dependencies
yarn && yarn start --skip-dependencies
pnpm install && pnpm run start --skip-dependencies
And that's it, you have successfully installed and started BrayanBot!
If you would like to keep the bot running after you log out of your terminal/machine; you may use PM2. It will also allow you to have BrayanBot persist between reboots, if you configure it that way.
Using PM2 Process Manager
# Install PM2 through NPM
npm install -g pm2
# Start BrayanBot with PM2
pm2 start index.js --name brayanbot
pm2 stop brayanbot# Stops the pm2 process
pm2 restart brayanbot# Restart the process
pm2 logs brayanbot# View recent logs as well as a live console
pm2 logs brayanbot --lines 1000 | nc termbin.com 9999# Export the bot's past logs and paste them to termbin.
Join our support server and open a ticket.