This is a simple bot that does basic shotouts in twitch chat whenever team members hop in and say something. For now, alerts are chat-only. Next version (soon) will also include a TTS shoutout option.
This and other Twitch bots are being developed during Live-Streams on Twitch.
Should be quick & easy to get up and running but, ofc, if you ever have questions about the specifics, please feel free to ask me during streams or post an issue above.
- Download & install Python 3.6 (if you haven't already)
- Install PIPENV (venv + package manager) ⇒
python -m pip install pipenv
- oauth token & client-id for a Twitch account for your bot
- Download & install Python (if you haven't already)
- Clone the repo, unzip it somewhere
- Open up a console window and navigate to the directory you unzipped it in
- Install requirements via
pipenv install
- Copy & rename
.env-example
to.env
- Pop in all your secrets into the respective areas within
.env
- Back to the console, do the
pipenv run python bot.py
thing to start the bot - The bot should greet chat when it comes online.
If using pipenv run python bot.py
doesn't work, it might be how your environment variables are set up. Try these out...
python -m pipenv run python bot.py
python3 -m pipenv run python3 bot.py
If you're still having issues, let me (Bun) know.
You can customize the greeting on line 43
in bot.py
. Default, it looks like this:
📢 @{team_member} has arrived!!! They're a fellow stream-team member! Learn more about the team here: https://www.twitch.tv/team/{team_name}
There are 2 events that are used in the code right now.. event_ready
and on_event
.
You can find more info in TwitchIO's official documentation.
This executes when the bot comes online, and will print out to the console.
This function executes once per event (or message) sent. You can make it handle input from chat that aren't necesarily commands, and fun stuff like that.
NinjaBunny9000 - Author, Project Manager - Twitch // Twitter
Literally everyone that's helped even the smallest bit during streams. Thank you so much, y'all!