-
Notifications
You must be signed in to change notification settings - Fork 1
Add Twitch voting support #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This adds a button to the Chaos Mod menu that allows authenticating with Twitch and listening for chat messages in the user's channel. Then, each user can vote on the different effect options by sending a chat message with the number corresponding to the effect they want (eg. 1 - 4). At the end of the voting interval, the votes get tallied, and the highest voted effect is applied. If there's a tie, the effect is chosen randomly between the tied options. This also modifies the progress bar to always display the text on the left side, to prevent it from moving around and becoming disorienting.
|
Hi there, Just one thing: would you be ok if I refactored the way it integrates into the selection logic? I'd like to take a more modular approach, to allow for more integration in the future. |
|
Of course, it's your mod after all :P |
- rename TwitchIntegration class to TwitchClient - make client id and port parameterized - add a copy url button to auth ui
|
@OrfeasZ i've finished my small refactoring, voting is now handled by a please have a quick look if i did something completely wrong in the way i interface with the twitch classes. also, i added your name ("OrfeasZ") to the developers list in the mod. |
|
Hi @OrfeasZ, thanks again for the contribution! as for upstreaming some of the utils: i will do so in the future, but for now want to wait to see the mod & utilities mature a bit more. |
|
Apologies for the delay. Looks good to me! |

Introducing the best way to ruin your chat!
This adds a button to the Chaos Mod menu that allows authenticating with Twitch and listening for chat messages in the user's channel. Then, each user can vote on the different effect options by sending a chat message with the number corresponding to the effect they want (eg. 1 - 4). At the end of the voting interval, the votes get tallied, and the highest voted effect is applied. If there's a tie, the effect is chosen randomly between the tied options.
This PR also modifies the progress bar to always display the text on the left side, to prevent it from moving around and becoming disorienting.
It's a bit hastily put together, but seems to work well enough after testing it on-stream with TheKotti.
On a completely different note: Would you be interested in upstreaming some of the utilities you've introduced here to the SDK itself? The entity lookup and binding stuff for example would be good candidates (where the latter could be added directly to the relevant entity classes). Also, feel free to join the Glacier modding discord where there's a dedicated channel for SDK-related shenanigans.