Squiso is a free, powerful automation tool that lets you customize your Twitch stream using simple scripts.
How to Toggle Filter In OBS Studio With Twitch Channel Points
This examples enables a filter in OBS Studio for 10 seconds and then disables it when a Twitch Channel Point Reward is redeemed.
Script Example
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);
});
}
}
}