Search in sources :

Example 6 with ChatPane

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);
        }
    }
}
Also used : ChatPane(gui.ChatPane)

Aggregations

ChatPane (gui.ChatPane)6 CombinedChatPane (gui.CombinedChatPane)5 GUIViewerList (gui.forms.GUIViewerList)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 TabPulse (thread.TabPulse)1