MCPcopy Index your code
hub / github.com/DougDougGithub/TwitchPlays

github.com/DougDougGithub/TwitchPlays @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
15 symbols 51 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TwitchPlays

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 following python modules using Pip:
python -m pip install keyboard
python -m pip install pydirectinput
python -m pip install pyautogui
python -m pip install pynput
python -m pip install requests

Once Python is set up, simply change the Twitch username (or Youtube channel ID) in TwitchPlays_TEMPLATE.py, and you'll be ready to go.

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!

Core symbols most depended-on inside this repo

ReleaseKey
called by 5
TwitchPlays_KeyCodes.py
reconnect
called by 3
TwitchPlays_Connection.py
HoldKey
called by 3
TwitchPlays_KeyCodes.py
HoldAndReleaseKey
called by 3
TwitchPlays_KeyCodes.py
twitch_connect
called by 2
TwitchPlays_Connection.py
get_continuation_token
called by 2
TwitchPlays_Connection.py
youtube_connect
called by 2
TwitchPlays_Connection.py
receive_and_parse_data
called by 1
TwitchPlays_Connection.py

Shape

Method 9
Function 4
Class 2

Languages

Python100%

Modules by API surface

TwitchPlays_Connection.py11 symbols
TwitchPlays_KeyCodes.py3 symbols
TwitchPlays_TEMPLATE.py1 symbols

For agents

$ claude mcp add TwitchPlays \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact