-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat (vars): Add $pollTitle and $pollChoices Variables #2777
base: v5
Are you sure you want to change the base?
Conversation
- $pollChoices provides for just about every imaginable piece of info about polling options for Poll Started, Poll Progress, and Poll Ended events. - Meanwhile, $pollTitle is a bit more focused for just the title of a poll. - Fix mismatched metadata for the poll-progress and poll-end events. - Implements the remaining bits of crowbartools#2732
- and add manual triggering to $pollChoices
- "title" is a valid propertySelector. - Ignore an empty string (or anything falsy) as a propertySelector. - Better commentary
- Include choice IDs in raw object returns (raw or null property selector). - Simulate more realistic IDs in polling event metadata.
would you mind adding "partially resolves #2348" into your applicable issues? |
Some questions that came up as I looked into this PR further: Can you expose the channel points vote cost? |
We could cache the poll started event data somewhere, then do maths with it, but we'd have to do so in the twurple poll started callback, not in our start poll effect. Otherwise, the information would be missing if the poll was externally started.
I've corrected my description: channel points votes is what the "points" property selector will give out. Twitch's event docs for this are so confusing though, so I'm honestly absolutely clueless as to what any of this means at a high level. Aren't all poll votes locked behind channel points now, and totalVotes essentially locked to channelPointsVotes in the event data? |
poll votes, I believe, are a combination between free votes, and channelPointsVotes |
Converting to a draft, while we get a similar interface ironed out with predictions. |
Add simulate event controls to $pollChoices. Thanks CK!
We now have simulate events functioning properly thanks to CKY. |
|
Description of the Change
$pollTitle
variable that provides the name of a poll being started, updated, and/or ended.$pollChoices
variable that can return any piece of information about poll choices for the same event types without requiring$objectWalkPath
or$arrayElement
-style walking:.$pollChoices
will yield an array of the choices available (withid
,index
,points
,title
,votes
properties), but accepts three optional parameters:propertySelector
sortOrder
desiredIndex
Here's a few
$pollChoices
use cases:$pollChoices[count]
$pollChoices[votes, votes, 1]
$pollChoices[index, votes, 1]
$pollChoices[votes, index, 1]
$pollChoices[points]
$math[$arrayJoin[$pollChoices[points], " + "]]
total channel point votes cast on all options.Complaints
Applicable Issues
#2348 (partial), #2732 (partial)
Testing
Screenshots
N/A