„Squiso“ yra nemokamas, galingas automatizavimo įrankis, leidžiantis tinkinti „Twitch“ srautą naudojant paprastus scenarijus.
Kaip sukurti !flowage Twitch komandą
Šis scenarijaus pavyzdys klausosi !followage, nuskaito naudotojo stebėtojų duomenis ir siunčia atgalinį pokalbio pranešimą, nurodydamas, kiek laiko jie sekė kanalą.
Scenarijaus pavyzdys
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.*;
import com.squiso.sysinfo.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
    
    @Override
    public void onTwitchChatMessage(OnTwitchChatMessageData data, API api) throws SquisoException {
        // If the chat message is !followage
        if (data.getMessageText().equals("!followage")) {
            // Fetch the follower data for the user
            FollowerData follower = api.getTwitchChannelFollower(data.getUserID());
            // Start composing the chat message
            SquisoString chatMessage = new SquisoString("");
            // If the follower data does not exist, they are not a follower
            if (follower == null) {
                chatMessage.append("@" + data.getUserName() + " is not a follower :(");
            } else {
                // Else they are a follower
                chatMessage.append("@" + data.getUserName() + " has been a follower ");
                chatMessage.append("for " + follower.getFollowedAt().getDetailedDurationFromNow() + " ");
                chatMessage.append("(since " + follower.getFollowedAt().toYYYYMMDDHHMMSS() + ")");
            }
            // Send the chat message
            api.sendTwitchChatMessage(chatMessage);
        }
    }
}
    