Squiso 是一款免费且功能强大的自动化工具,可让您使用简单的脚本自定义您的 Twitch 流。

如何在 Twitch 聊天中定期宣布你的社交活动

此脚本示例创建了一个可能的聊天公告列表,然后每 20 分钟随机发送其中一个作为 Twitch 聊天公告。

观看视频

脚本示例

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 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); } } }