Squiso je besplatan, moćan alat za automatizaciju koji vam omogućuje da prilagodite svoj Twitch stream pomoću jednostavnih skripti.

Kako automatski prijaviti Twitch Chat u tekstualnu datoteku

Ovaj primjer skripte sluša sve Twitch chat poruke i automatski ih prijavljuje u tekstualnu datoteku na vašem računalu.

Pogledajte video

Primjer skripte

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 onTwitchChatMessage(OnTwitchChatMessageData data, API api) throws SquisoException { // Create the line that should be appended to the file SquisoString line = new SquisoString("[" + SquisoDate.nowLocal().toYYYYMMDDHHMMSS() + "] " + data.getUserName() + ": " + data.getMessageText() + "\n"); // Write it to the terminal console api.log("Logging chat message: " + line); // Create a filename based on the current date String file = "chat_log_" + StringUtil.toFilenameFriendly(SquisoDate.nowLocal().toYYYYMMDD()) + ".txt"; // Append the line to the file line.appendToFile(file); } }