After reading the Twitch api for Twitch bits, I don’t see any API that currently exists that will show when the user currently opens the dialog for bits, BEFORE confirming/completed.
I do see OnTransactionComplete(Extensions Reference | Twitch Developers) and OnTransactionCalled (Extensions Reference | Twitch Developers)
But nothing for OnTransactionOpen… which could fire when the dialog box is open, but the user does not confirm nor cancel.
In my case it would help with race conditions when something becomes available. Let’s say multiple dialogs are open, or multiple users open dialogs, and there is no way to track that, the so-called winner. The dialog simply opens when a UseBits API is called, but the event is not registered until after the user selects an option (confirm/cancel). Therefore multiple winners could open the dialog and there is nothing stopping that race condition.
The only way I can think of tracking this is by leveraging a backend when the UseBits function is called. However, this would require alot of unecc coding.
Is that an option somewhere that I am not seeing?
It sounds like you are trying to do something that bits in extensions are not designed to do.
There isn’t supposed to be a “race” and only one purchaser.
it sounds like you want to only allow one person to purchase, the system just isn’t designed to do that, it’s expected that products will be generally available all the time.
And then you have 10 people that purchases when you only want 1 right?
Correct, I would like one person to be able to purchase something when it’s available.
Is there anyway to request a new API function to meet this need: something that registers when the dialog is open?
I doubt it would be made possible.
I have a feeling a bunch of legal stuff would get in the way…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.