The program will use the .json files provided, and launch X docker containers, each based on a file.
In each container, a python program performs the following pseudo-code:
when CHANNEL_TO_MONITOR goes live:
for MESSAGE in MESSAGES_TO_SEND:
send MESSAGE on the chat of CHANNEL_TO_SEND_MESSAGE
sleep(COOLDOWN_BETWEEN_MESSAGES)
Open a terminal and type the following commands:
git clone https://github.com/titouanck/Twitch-messageOnLive.git
cd Twitch-messageOnLive
Inside the configurations/
directory, you will find multiple files ending with the extension .json
.
To get started, you can take a look at any of the .json file present in the directory.
Let's say we want to send « hello, world » on VICTOR's chat when NICOLAS goes live on Twitch.
Then, we could create a file some_name.json
inside the configurations/
directory and fill it like this:
{
"channel_to_monitor": "NICOLAS",
"channel_to_send_message": "VICTOR",
"messages_to_send": ["hello, world"],
"cooldown_between_messages": 0
}
Go back to your terminal and run the following command:
make
Follow the link to obtain an OAuth user token, which will only be visible to you and your browser.
Copy and paste the OAuth token into the terminal, and press enter.
If your token no longer works, you can simply delete the ./docker/.env file and type make
again.
You should now see something like that.
You don't ? It is possible that your docker installation requires you to be root to manipulate containers.
If so, use make sudo
instead of make
Creating docker/.env file...
alpine3.19: Pulling from library/python
Status: Image is up to date for python:alpine3.19
. . .
WARNING: The JSON_FILE_TRUNC variable is not set. Defaulting to a blank string.
WARNING: The JSON_FILE variable is not set. Defaulting to a blank string.
. . .
[✔️] docker-compose built successfully
Starting mol_kyzen_ ... done
Launching docker-compose up with kyzen_.json
Starting mol_podasai ... done
Launching docker-compose up with podasai.json
Starting mol_snayzy ... done
Launching docker-compose up with snayzy.json
Logs including live status and all chat messages are saved in the /logs
directory for as long as the program is running.
When kyzen_ launches his live stream, the first person to say « bonjour » is offered VIP status on his channel.
After several failed attempts to be the first to click on the stream start notification and say « bonjour », I thought it might be fun, and even a bit useful, to find a way of always being the first to say hi.