Interactive Twitch IRC bot
This is my IRC bot I threw together hastily night by night to add some fun interactivity to twitch.
I'm using an arduino currently to drive some leds/servo's/vibration motors, but I plan on expanding this.
The code is VERY ugly, VERY buggy, and is changed just about daily... Its literally cobbled together every night about 30 minutes before I stream to add a few features/fix a few bugs here and there. (I avoid large re-writes because it would mean downtime for the stream) which makes it even uglier lol...
Software Requirements:- Python 2.7.* x86 (latest) https://www.python.org/downloads/
- Mysql http://www.easyphp.org/
- Add sql setup here
- pyserial (pip install pyserial)
- pygame http://www.pygame.org/download.shtml
- requests (pip install requests)
- win32api https://sourceforge.net/projects/pywin32/files/
- mysql https://dev.mysql.com/downloads/connector/python/
- comtypes (pip install comtypes)
- pil (http://www.pythonware.com/products/pil/)
- Update twitch_auth.py
- get_oauth: https://twitchapps.com/tmi/
- get_bot: Twitch bot username
- get_db_user: username configured in mysql db
- get_db_pass: password configured for mysql db user
- Open cdrom
- Vibrate control (if using one)
- Drop a box
- Grab fabric of pants with servo strapped to leg
- Tap shoulder
- Vibrate chest
- Rattle vibration motor on desk
- Touch neck/back with servo
- Pop up scary gif
- write scare status to txt for OBS display
<h1>Troll features (also available during scary games)</h1>
<ol>
<li>Playing sounds (in center/left/right ears)</li>
<li>Turning off all monitors</li>
<li>Turning off all volume</li>
<li>Move game window around monitors randomly</li>
<li>Strobe game sccreen</li>
<li>Dim game screen</li>
<li>Draw a randomly sized black box in the middle of the screen</li>
<li>Turning off all monitors</li>
<li>Randomly press keyboard buttons</li>
<li>Randomly move mouse around</li>
<li>Randomly disable all keyboard and mouse input</li>
<li>Minimize all windows</li>
<li>Turning off all monitors</li>
</ol>
- Midi Drum input to light output
- alternate(color,color)
- chase(color|*)
- fire(color|color) animation
- disco fire
- disco animation
- disco strobe
- strobe animation
- accept html ffffff #ffffff 0xffffff ff,ff,ff 255,255,255 in all animations for colors
- after light command, fade to white during normal, and go to black during scary
- color commands only run for a set amount of time
- prevent light animations from occuring while scares are going on
- "command mode" to select a viewer at random, and let them use priviledged commands
- !optin, and !optout commands to allow users to opt in and out of "command mode"
- database persistence
- !pass command to allow users to pass to someone else, or a specific user
- timer thread to automatically give up control from afk users
- switching mode from scary to normal
- switch if user in control opts out
- get viewers as well as moderators
- allow streamer to use any command without causing a switch
- !game command lets viewers know what game is being played
- admin commands allowing manual switch's, and switch next (to not steal the current persons turn)
- !whosgotit command to let viewers know who currently has control
- !timeleft command to let viewers know how much time is left
- !opted command to let viewers know if they are opted in or not