Skip to content

Conversation

@OrfeasZ
Copy link
Contributor

@OrfeasZ OrfeasZ commented Jan 11, 2026

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.

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.
@shadow578
Copy link
Owner

Hi there,
well, that was quick 😁
awesome work, I've just tested it and it seems to work perfectly.

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.

@OrfeasZ
Copy link
Contributor Author

OrfeasZ commented Jan 12, 2026

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
@shadow578
Copy link
Owner

@OrfeasZ i've finished my small refactoring, voting is now handled by a IVotingIntegration interface. Users select the voting integration via drop-down.
i didn't end up changing much of your original code, as it seems fine to me.
mostly just some changes to integrate into the new system.

please have a quick look if i did something completely wrong in the way i interface with the twitch classes.
i don't think, as it did work for me, but you never know :D

also, i added your name ("OrfeasZ") to the developers list in the mod.
feel free to change it if you'd prefer something else.

hm-twitchvotingpr

@shadow578 shadow578 merged commit 11513cd into shadow578:main Jan 18, 2026
@shadow578
Copy link
Owner

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.

@OrfeasZ
Copy link
Contributor Author

OrfeasZ commented Jan 19, 2026

Apologies for the delay. Looks good to me!

@OrfeasZ OrfeasZ deleted the feature/twitch-voting branch January 19, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants