Open jonwalch opened 4 years ago
https://dev.twitch.tv/docs/extensions/reference#helper-extensions
twitch.ext.actions.requestIdShare: function()
Twitch.ext.viewer.id
const [twitchID, setTwitchID] = useState<string | null>(twitch.viewer.id)
<button
className="button button--vote"
style={{minWidth: "40%", margin: "0.25em", padding: "0.25rem"}}
type="button"
key="Test"
// disabled={toggleValid()}
onClick={() => {
// CORSMakePropBet(false)
if (process.env.NODE_ENV === 'development') {
setTwitchID("123456789")
console.log("set twitch id dev")
} else {
twitch.actions.requestIdShare()
console.log("set twitch id prod")
}
}}>
Open ID Menu
</button>
// on page load useEffect()
twitch.onAuthorized((auth: any) => {
setTwitchID(twitch.viewer.id)
console.log(auth)
})
Rolling #398 into this https://dev.twitch.tv/docs/extensions/reference#helper-extensions twitch.ext.onVisibilityChanged
EDIT: Not doing this, requires a release everytime we want to change it
Also make streamer access whitelist:
Rillo
birdfood
akoozabazooka
whiplash_gg
jawbreakerplease
teamsp00ky
thecanadieneh
Also add check marks from main site to bet buttons
Copy Charmin flow. Button prompts opening of extension settings and clicking the share username thing.
These users show up as ttv/{TWITCH_USER_NAME} on our site and current bets boardsIt's not even their username. Its a long number that is static and represents them.