iGoodie / TwitchSpawn

👾 TwitchSpawn is a Minecraft mod, which is designed for Twitch streamers using 3rd party streaming tools! (comes with its own language!)
https://www.curseforge.com/minecraft/mc-mods/twitchspawn
Eclipse Public License 1.0
53 stars 25 forks source link

Installation for Youtube #73

Open emregit32 opened 5 days ago

emregit32 commented 5 days ago

Hello,

I'm trying to set it up for YouTube Live, but where do I put the fetch_token.js file, where exactly do I paste the /socket/token code?

Can you help?

iGoodie commented 2 days ago

Hey there!

I think Youtube events are supported by Streamlabs. However I am unfortunately not sure in which format they respond with. So it is a bit tricky with the current version (TSL1.0). I'm working on a version to overcome this tho (TSL1.5).

However, in the mean time, you can try to use TwitchSpawn with Streamlabs. Try those steps:

  1. Follow the official guide to install TwitchSpawn mod: https://igoodie.gitbook.io/twitchspawn/basics/getting-started
  2. Follow the official guide to connect to Streamlabs: https://igoodie.gitbook.io/twitchspawn/basics/getting-started/configuring-credentials
  3. Write a ruleset that reacts to Youtube events (Follow the official guide to learn more about coding TSL Rulesets)

Examplar Youtube events rules:

# Drops a diamond, when iGoodie subscribes
DROP diamond 
 DISPLAYING %[{ text: "iGoodie subscribed!", color: "blue" }]%
 ON Youtube Subscription
 WITH actor IS %iGoodie%

# Drops a stick, when iGoodie becomes a sponsor
DROP stick
 ON Youtube Sponsor
 WITH actor IS %iGoodie%

# Executes a command, when $2.00 worths of Superchat occurs
EXECUTE %/gamemode @s creative%
 ON Youtube Superchat
 WITH amount = 2000000 # For some reason $1.00 = 1,000,000