Twitch chat and Twitch alerts app plugin for Project J.A.I.son. Detects most of the alertable events and updates jaison-core with Twitch chat every second.
This project was tested on python3.12
- Create and activate your virtual environment using
conda
orvenv
. - Install dependencies
pip install -r requirements.txt
- Setup Twitch application and
.env
. Give it the redirectshttp://localhost:5000/auth/redirect/code
andhttp://localhost:5000/auth/redirect/tokens
You can name it whatever you want. Just give it the following OAuth Redirect URLs
, Category
, and Client Type
.
Once you created your new application, click Manage
and copy the Client ID
and Client Secret
into your .env
file following .env-template
.
-
Setup
config.yaml
to where jaison-core is running, where you want to store your Twitch tokens on your computer (somewhere safe that you won't accidently leak), and your Twitch user id. You can get your Twitch user id here and use that for both thetwitch-bot-id
andtwitch-target-id
. These should be surrounded by"
, for example:"786978930"
. Available options forchat-mode
areALL
(all messages appear like texting),KEYWORD
(filter messages that specify keywords inchat-keywords
comma-separated),HIGHLIGHT
(filter only highlighted messages),BITS
(filter only messages with at leastchat-bits-threshold
bits), andDISABLE
(turn off). -
Authenticate the application. Run
python ./src/auth.py
. You should see a warning log starting withCan't subscribe to events until authenticated.
. Click on the link there and authenticate through Twitch.
After setting things up, you can simply run python ./src/main.py
For runtime options, run python ./src/main.py --help
Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Project J.A.I.son: https://github.com/limitcantcode/jaison-core
Join the community Discord: https://discord.gg/Z8yyEzHsYM