Clone or download the Github project:
git clone https://github.com/cosasdepuma/chappie.git Chappie
or
git clone https://gitlab.com/cosasdepuma/chappie.git Chappie
Enter to the directory:
cd Chappie
Install all the npm modules:
npm i
The credentials.json
file must be created in the src
folder according to the following format:
{
"MLAB_DOCUMENT": "aaaabbbbccccddddeeeeffff",
"MLAB_APIKEY": "0000AAAA0000AAAA0000AAAA0000AAAA",
"TWITCH_CLIENT_ID": "0000xxxx0000AAAA0000xxxx000AAA",
"TWITCH_OAUTH": "oauth:xxxxxxxxxxxxxxxxx0000000000000"
}
You can customize the bot to fit your Twitch channel by modifying the config.json
file in the src
folder.
{
"owner": "YOUR_CHANNEL_NAME",
"bot_name": "ChappieTheBot",
"pet": "panda",
"follow_check_interval": 5,
"points": {
"name": "My Awesome Coin",
"per_view": 5,
"reward_interval": 5
},
"blacklist": [
"YOUR_CHANNEL_NAME",
"ChappieTheBot",
"Moobot",
"Nigthbot",
"StreamElements"
],
"debug": false,
"credentials_path": "src/credentials.json"
}
Key | Value | Optional? |
---|---|---|
owner | Owner of the channel where the bot will be | ✖️ |
bot_name | Name of the Twitch account that will be used by the bot | ✖️ |
pet | Name of the folder that contains the GIFs within the path resources/pets |
✖️ |
follow_check_interval | Interval in which it will be checked if there has been a new follow (in seconds) | ✖️ |
points. name | Channel currency name | ✖️ |
points. per_view | Number of points given to each viewer | ✖️ |
points. reward_interval | Reward interval to each viewer for watching the channel (in seconds) | ✖️ |
blacklist | Users that the bot will ignore (will not give them points either) | ✖️ |
debug | Enable debug console logs (dev only) | ✔️ |
credentials_path | Path of the credentials.json file |
✖️ |
Run the application through NodeJS:
npm test
You can also install Electron globally on your computer through the command npm install -g electron
and running the program with:
electron .
You can create an executable according to your Operating System by installing and running electron-packager
module:
npm install --save-dev electron-packager
npm run-script build
If you want to change the default pet, you should download three GIFs like this and rename it to [action].gif
GIFs must be deposited in the src/resources/pets/[animal]
folder.
Current actions available are: IDLE, ATTACK, GREETINGS, EAT, DANCE
Chappie
< Repository >
|__ .img
|__ .gitignore
|__ LICENSE
|__ README.md
< Dependencies >
|__ package.json
|__ package-lock.json
< Source >
|__ src
|__ resources
|__ pets
|__ panda
|__ rabbit
|__ sounds
|__ components
|__ commands.js
|__ config.js
|__ events.js
|__ pet.js
|__ quotes.js
|__ sounds.js
|__ twitch.js
|__ views
|__ index.html
|__ index.css
|__ main.js
|__ config.json
|__ credentials.json <- This file must be added manually
Please contact with Kike Puma if you need more information.