public void Start() { var settings = GlobalSettings.Load(); channel_parser.Init(); if (settings == null) { return; } VersionCheckState.Execute(new CancellationToken()); StartNet(settings.Port); PollRarePokemonRepositories(settings); var discordWebReader = new DiscordWebReader(); while (true) { try { pollDiscordFeed(discordWebReader.stream); } catch (WebException) { Log.Warn($"Experiencing connection issues. Throttling..."); Thread.Sleep(30 * 1000); discordWebReader.InitializeWebClient(); } catch (Exception e) { Log.Warn($"Unknown exception", e); break; } finally { Thread.Sleep(20 * 1000); } } Console.ReadKey(true); }
public void Start() { var settings = GlobalSettings.Load(); _channelParser.LoadChannelSettings(); if (settings == null) { return; } VersionCheckState.Execute(new CancellationToken()); _clientWriter.StartNet(settings.Port); WebSourcesManager(settings); Console.Read(); }
public void Start() { var settings = GlobalSettings.Load(); _channelParser.LoadChannelSettings(); if (settings == null) { return; } GlobalSettings.Output?.SetStatus("Connecting..."); VersionCheckState.Execute(new CancellationToken()); if (GlobalSettings.IsServer) { Task.Run(() => { _server.Start(); }); } else { ClientWriter.Instance.StartNet(GlobalSettings.Port); Log.Info($"Starting with Port: {GlobalSettings.Port}"); } if (GlobalSettings.IsManaged) { Task.Run(() => { _pogoClient.Start(_channelParser.Settings); }); StartBotListeners(); } else if (GlobalSettings.VerifyOnSkiplagged) { SkipLaggedPokemonLocationValidator.Instance.StartVerifierThread(); } WebSourcesManager(settings); Console.Read(); }