Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

2. Installation

Lea Seibert edited this page Aug 8, 2020 · 5 revisions
  • Open a terminal window (Applications/Utilities/Terminal on macOS)
  • Navigate to the folder you want to clone the bot into
cd ~/Documents/
  • Clone the repository and enter the directory
git clone https://github.com/LeaPhant/pagkibot.git
cd pagkibot
  • Now you will have to install the dependencies
npm i
  • Now open the credentials.json file in any text editor and enter the required information in between the quotes
{
    "twitch": {
        "clientID": "XXXXXXXXXXXXXXXXXXXXX",
        "clientSecret": "XXXXXXXXXXXXXXXXXXXXX"
    },
    
    "discord": {
        "clientID": "XXXXXXXXXXXXXXX",
        "token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
    
}

You can find the Twitch Client ID like this in the Twitch developer console.

You can find the Discord Client ID like this in the Discord developer console.

You can find the Discord Token like this in the Discord developer console (you will be prompted add a bot to your application first, just follow the instructions)

  • Now that the information is filled in, run the bot once
npm run start

Press Ctrl+C to stop the bot again.

  • if there's no errors you should be greeted with an invite link. Use this to invite the bot to every server you want it in.
  • The next step is setting up an automated way of keeping this bot running 24/7 cause it would be pointless otherwise
sudo npm i -g pm2
pm2 start --name pagkibot index.js
pm2 save
pm2 startup
  • Now the bot should be up and running and also automatically start on boot.

Next step: Configuration

Clone this wiki locally