Twitch Sohbetinde Sosyal Medyanızı Periyodik Olarak Nasıl Duyurursunuz
Bu script örneği olası sohbet duyurularının bir listesini oluşturur ve ardından her 20 dakikada bir bunlardan birini rastgele Twitch sohbet duyurusu olarak gönderir.
Videoyu İzle
Komut Dosyası Örneği
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);
}
}
}