Clone or download the Github project:
git clone https://github.com/cosasdepuma/chappie.git Chappie
or
git clone https://gitlab.com/cosasdepuma/chappie.git ChappieEnter to the directory:
cd ChappieInstall all the npm modules:
npm iThe 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 testYou 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 buildIf 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.