Before you are able to start working on the bot, you will need certain programs to get you started.
- A code editor such as Visual Code
- You need an Apache server installed so you can connect your bot with our database XAMPP
- GIT to clone this project
- NodeJS to install all the modules and packages that are needed
Open GIT. You can do this by right clicking anywhere on your Desktop and select Git Bash Here
. Once it opens you would need to set up your username and email address.
- Type
git config --global user.name "[YOUR_GITHUB_USERNAME]"
and press enter. - Type
git config --global user.email "[YOUR_GITHUB_EMAIL]"
and press enter.
Once you have downloaded the above you can fork
this repository. A new window will be opened with a message that its trying to fork a repository. Wait until this is done.
After that you want to clone
the repository to your computer.
- Create a new folder wherever you like
- Right-click in the created folder and click on
Git Bash Here
- Type
git clone https://github.com/[YOUR_USERNAME_HERE]/web-helper.git
- Navigate in the folder by typing
cd web-helper
- Copy paste the following into your Git Bash window
git remote add upstream https://github.com/DevShaded/web-helper.git
- Right-click on the
web-helper
folder and click onGit Bash here
- Type
git fetch upstream
- Type
git checkout master
- Then type
git merge upstream/master
Do these commands when your branch is behind the master. It will say on top off the GitHub repository.
Example: This branch is 4 commits behind DevShaded:master.
- Type
npm install
in your Git Bash window
PM2 is a process application that is able to run your project.
- Type
npm install pm2 -g
in your Git Bash.
- Make a
.env
file for the tokens. - You will get the token and the DB from DevShaded on Discord
- Open a new Git Bash window (Navigate to your project folder, right click and select
Git Bash Here
). - Type the following and press enter
pm2 start pm2-server-start.json
- Type the following and press enter
pm2 logs 0
orpm2 logs web-helper
You will now see a window with information about the bot. (Its logs. It should outputBot has succesfully signed in and is listening to events
) - Open Discord and see the magic bot being online!