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_idandaccess_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.jsonlist 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.jsonLinux:
cp example-config.json config.jsonOnce the installation and configuration are complete, you can start using the bot. Run the following command:
npm startOptionally 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 pm2Now if you are still in the same directory as the repository you just cloned, simply run:
pm2 start index.jsYou can check the status of the application by running:
pm2 listAnd check logs with:
pm2 logsTo stop the application:
pm2 stop index.jsIf you've made changes and want to reformat the code, you can run lint with:
npm run lint:fix