Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #546
Originally I wanted a way to automatically contribute points to a particular channel's community goals but it ended up being simpler to implement it generically for any channel. I don't mind maintaining my fork for personal use but if other people are interested I'm more than happy to contribute.
Technically this adds a dependency on 2 Twitch GQL operations so there may be a need to update this if Twitch changes the API in the future.
Type of change
How Has This Been Tested?
I originally developed this around mid 2023 and had the functionality active for several months. Unfortunately, the channel I used to use this on is on hiatus so I can only verify it worked as of February 2024. However, I did manage to verify the hash for 1 of the Twitch operations (UserPointsContribution) hasn't changed since then.
There are a couple of TODOs left in the code corresponding to aspects of the API I was unable to independently verify as they are for events that rarely occurred in my testing. More eyes on this would help see if there are any issues. Personally, I never saw any issues with them so either they work fine or shouldn't have a major impact if they do fail, restarting the miner should fix any issues since reloading the channel points context will also reload the goal data.
Checklist: