use of gui.ChatPane in project Botnak by Gocnak.
the class ViewerCount method beat.
@Override
public void beat() {
beating = true;
Set<String> keys = GUIMain.chatPanes.keySet();
for (String s : keys) {
if (s.equalsIgnoreCase("system logs"))
continue;
ChatPane cp = GUIMain.getChatPane(s);
if (cp == null)
continue;
if (APIRequests.Twitch.isChannelLive(s)) {
int count = APIRequests.Twitch.countViewers(s);
if (count >= 0) {
cp.setViewerCount(count);
}
} else {
cp.setViewerCount(-1);
}
}
}
Aggregations