Squiso on tasuta võimas automatiseerimistööriist, mis võimaldab teil kohandada oma Twitchi voogu lihtsate skriptide abil.
Kuidas luua !so Shoutout Twitchi käsku
See skriptinäide kuulab !so ja käivitab Twitchi vestluses hüüdlause.
Skripti näide
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 {
// If the chat message starts with "!so "
if (data.getMessageText().startsWith("!so ")) {
// Get the name by taking everything after 4 characters into th string
SquisoString userName = data.getMessageText().substring(4);
// Get user data based on their username
UserData userData = api.getTwitchUserData(userName);
// Send the shoutout in chat
api.sendTwitchShoutout(userData.getID());
}
}
}