A simple websocket server forwarding chat messages received from a livestream chat.
It is made to be used in combination with Twitch Heatmap Chat (https://github.com/FDMX2/Twitch-Heatmap-Chat)
Download the latest executable here (https://github.com/FDMX2/MessageForwarder/releases) and start it or run the main.py you find in the MsgForwarder folder (only if you have python 3.6 or higher installed).
The server is now ready to serve messages from livestreams. You can connect via the default port 13254.
- Open the Twitch Heatmap Chat (https://fdmx2.github.io/Twitch-Heatmap-Chat/) in your browser.
- As Channel name enter the webscoket address and livestream url separated by | like so:
ws://ws_address|LIVESTREAM_URL
For example if you run the server on the same machine:
ws://127.0.0.1:13254|https://www.youtube.com/watch?v=VIDEOID
MessageForwarder only forwards the messages from the chat downloader (https://github.com/xenova/chat-downloader) thus supporting all services it does. In the current version (0.2.0) these services are:
- YouTube.com - Livestreams, past broadcasts and premieres.
- Twitch.tv - Livestreams, past broadcasts and clips.
- Reddit.com - Livestreams, past broadcasts
For creating the stand alone executable out of the main.py yourself you can do the following:
- Ensure you have python 3.6 or higher installed or download it from python.org
- Open a command prompt, Powershell or bash
- In your command prompt move to the folder you want to use
- Create a virtual environment by typing in:
This will create a the MsgForwarder folder
python -m venv MsgForwarder
- Activate the created virtual environment by typing in:
(for command prompt use activate.bat and for Powershell actiavte.ps1 instead of activate)
MsgForwarder\Scripts\activate
- Copy the main.py and requirements.txt from the repository into your created MsgForwarder folder
- Move your command prompt to the created MsgForwarder folder
- Install the necessary dependencies via your command prompt:
python -m pip install -r requirements.txt
- For testing you can run the main.py via
python main.py
- If everything works close the program by pressing CTRL + c in your command prompt
- Finally compile it by typing:
pyinstaller --onefile -F --collect-data chat_downloader main.py
- After execution you should now have the main executable in the dist folder
- Websocket Server (https://github.com/Pithikos/python-websocket-server) to simplify websocket handling
- Chat downloader (https://github.com/xenova/chat-downloader) to receive the messages
The MIT License
Copyright (c) 2022 FDMX2 @ github