Squiso on tasuta võimas automatiseerimistööriist, mis võimaldab teil kohandada oma Twitchi voogu lihtsate skriptide abil.

Kuidas Twitchi kanalipunktidega OBS Studio filtrit sisse lülitada

Need näited lubavad filtri OBS Studios 10 sekundiks ja seejärel keelavad selle, kui Twitchi kanalipunkti preemia lunastatakse.

Skripti näide

import com.squiso.*; import com.squiso.exception.*; import com.squiso.scripting.*; import com.squiso.scripting.data.*; import com.squiso.keyboard.*; import com.squiso.twitch.*; import com.squiso.datatypes.*; import com.squiso.utils.*; // Important - Please do not change the row below - otherwise you will get a compilation error! public class Script_Example extends SquisoScript { @Override public void onTwitchChannelPointRedeem(OnTwitchChannelPointRedeemData data, API api) throws SquisoException { // If the reward that got redeemed is called "Pixelate Webcam" if (data.getRewardName().equals("Pixelate Webcam")) { // Specify the source SquisoString sourceName = new SquisoString("Webcam"); // Specify the filter SquisoString filterName = new SquisoString("Pixelate"); // Enable the filter api.setOBSFilterEnabled(sourceName, filterName, true); // Specify a wait time of 10 seconds SquisoInteger waitTime = new SquisoInteger(10 * 1000); // 10 seconds later, disable the filter again api.doLater(waitTime, () -> { // Disable the filter again api.setOBSFilterEnabled(sourceName, filterName, false); }); } } }