Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Archive-Puma/Chappie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chappie

NodeJS Version Electron TMI.js License FOSSA Status

📼 Clone me!

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

🔌 Dependencies

Enter to the directory:

cd Chappie

Install all the npm modules:

npm i

📄 Configuration

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"
}

Description of the fields in the config.json file

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 program!

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 .

🔨 Compilation

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

🐹 Pets and more Pets!

If you want to change the default pet, you should download three GIFs like this and rename it to [action].gif

IDLE ATTACK GREETINGS EAT DANCE
panda/idle.gif panda/attack.gif panda/greetings.gif panda/eat.gif panda/dance.gif
Panda Idle Panda Attack Panda Greetings Panda Eat Panda Dance
rabbit/idle.gif rabbit/attack.gif rabbit/greetings.gif rabbit/eat.gif rabbit/dance.gif
Rabbit Idle Rabbit Attack Rabbit Greetings Rabbit Eat Rabbit Dance

GIFs must be deposited in the src/resources/pets/[animal] folder.

Current actions available are: IDLE, ATTACK, GREETINGS, EAT, DANCE

🌍 Scheme of contents

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.