Example #1
0
        public static async void WatchBoardState()
        {
            if (_running)
            {
                return;
            }
            if (!Config.Instance.SendTwitchExtensionData || Config.Instance.SelectedTwitchUser <= 0 || (HSReplayNetOAuth.TwitchUsers?.Count ?? 0) == 0)
            {
                return;
            }
            var streaming = await TwitchApi.IsStreaming(Config.Instance.SelectedTwitchUser);

            OnStreamingChecked?.Invoke(streaming);
            if (!streaming)
            {
                return;
            }
            _running = true;
            BoardStateWatcher.Start();
        }