These are the three Python files I use that allows Twitch Chat or Youtube Chat to control your keyboard or mouse to play a game. You are welcome to use or adapt this code for your own content.
To run the code you will need to install Python 3.9.
Additionally, you will need to install the python modules using the txt (Credit DougDougGithub#8 and DougDougGithub#4):
python -m pip install -r requirements.txt
Once Python is set up, simply change the Twitch username (or Youtube channel ID) in TwitchPlays_Settings.py, and you'll be ready to go (if you're wonderring why I made the settings file is because sometimes I want my chat to find the stream to control my computer and I dont want to accidentally leak it).
This code is originally based off Wituz's Twitch Plays template, then expanded by DougDoug and DDarknut with help from Ottomated for the Youtube side. For now I am not reviewing any pull requests or code changes, this code is meant to be a simple prototype that is uploaded for educational purposes. But feel free to fork the project and create your own version!