Squiso on tasuta võimas automatiseerimistööriist, mis võimaldab teil kohandada oma Twitchi voogu lihtsate skriptide abil.
Kuidas Twitchi vestluses perioodiliselt oma suhtlustest teada anda
See skriptinäide loob loendi võimalikest vestlusteadetest ja saadab seejärel iga 20 minuti järel ühe neist juhuslikult Twitchi vestlusteatena.
Vaata videot
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 {
public void onEveryMinute(OnEveryMinuteData data, API api) throws SquisoException {
// Every 20 minutes
if (data.is(20)) {
// Create a list of different text messages to send
SquisoList<SquisoString> list = new SquisoList<>();
// Compose and add the first message into the list
SquisoString message1 = new SquisoString("Please follow me on socials! youtube.com/squiso ⭐ twitter.com/squiso ⭐ tiktok.com/squiso");
list.add(message1);
// Compose and add the first message into the list
SquisoString message2 = new SquisoString("Have you checked out my latest YouTube? 🤩 https://www.youtube.com/watch?v=2F-SnbeaBUw");
list.add(message2);
// Get a random message from the list
SquisoString messageToSend = list.getRandom();
// Send it in chat
api.sendTwitchChatAnnouncement(messageToSend);
}
}
}