स्क्विसो एक निःशुल्क, शक्तिशाली स्वचालन उपकरण है जो आपको सरल स्क्रिप्ट का उपयोग करके अपनी ट्विच स्ट्रीम को अनुकूलित करने की सुविधा देता है।
ट्विच चैट को स्वचालित रूप से टेक्स्ट फ़ाइल में कैसे लॉग करें
यह स्क्रिप्ट उदाहरण सभी ट्विच चैट संदेशों को सुनता है और स्वचालित रूप से उन्हें आपके कंप्यूटर पर एक टेक्स्ट फ़ाइल में लॉग करता है।
वह वीडियो देखें
स्क्रिप्ट उदाहरण
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 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);
}
}