Repository navigation
Channel point rewards that add PixFray dollars (backend) - #43
Merged
Merged
Conversation
The broadcaster makes Twitch channel point rewards through two new admin actions; each reward gets its own redemption subscription. A redemption adds the reward's dollars to the viewer's saved fighter once (keyed by redemption id), marks it FULFILLED, and the bot posts the new wallet. Viewers with no saved fighter are refunded (CANCELED) and pointed at the fighter page. A separate points sign-in asks for channel:manage:redemptions. The mod page UI comes in a follow-up.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Streamers asked to use Twitch channel points instead of a separate PixFray currency. This adds rewards that grant PixFray dollars; the existing shop stays.
What changes
createPointRewardanddeletePointReward, broadcaster or owner only. Each reward gets its ownchannel.channel_points_custom_reward_redemption.addsubscription.FULFILLED, and the bot posts the new wallet.CANCELED) and linked to the fighter page./auth/login?channel=<login>&connect=points) asks forchannel:manage:redemptionson top of the earlier scopes.Not in this PR
Tests
tests/points.test.tsdrives signed EventSub bodies throughhandleEventsubinto a real room on node:sqlite, and the admin actions through the Worker with Twitch mocked.bun run checkpasses (421 tests).Docs: CONTRACTS.md §2, §4, §8; DUELS.md dollars; AGENTS.md code index.