A tiny personal chatbot to change your color every message.
Something of a tutorial for using Javascript with @kararty/dank-twitch-irc
Before you begin, ensure you have the following installed:
Open Command Prompt, Windows Powershell, or a similar terminal to enter the following commands to install the bot:
-
Clone the Repository: Start by cloning the bot's repository to your local machine.
git clone https://github.com/RyanPotat/basicTwitchBot.git
-
Install Dependencies: Install the required Node.js packages by running:
npm install
You'll need to configure the bot before you can use it. Open example-config.json
and then enter the following:
id
- Your Twitch user ID.username
- Your Twitch user login.helix_id
andaccess_token
- Twitch Helix API Access to generate your Twitch Helix API access token and client ID.channels
- A list of channels to join.whitelist_channels
- A list of channels whitelisted to use commands.color_set
- Choose from thecolors.json
list to find a color set to your liking, or create your own unique set of colors. Defaults to the standard Twitch colors. Keep in mind you must have Turbo or Prime to use anything other than the standard Twitch colors.
Available color sets:
- twitch_basic
- pastels
- longPastels
- rainbow
- longRainbow
- earthTones
- neon
- grayscale
- coolBlues
- warmReds
- vibrantGreens
- deepPurples
- candyShop
- sunsetShades
- autumnTones
- oceanBlues
- burger
- christmas
- halloween
Now, just rename example-config.json
to config.json
You could do this from command line with:
Windows:
copy example-config.json config.json
Linux:
cp example-config.json config.json
Once the installation and configuration are complete, you can start using the bot. Run the following command:
npm start
Optionally you can use PM2 to run this process in the background, here's some basic instructions to set it up. First, run this code to install:
npm install -g pm2
Now if you are still in the same directory as the repository you just cloned, simply run:
pm2 start index.js
You can check the status of the application by running:
pm2 list
And check logs with:
pm2 logs
To stop the application:
pm2 stop index.js
If you've made changes and want to reformat the code, you can run lint with:
npm run lint:fix