public void Construct(ChatService chatService, StreamlabsClient streamlabsClient, AlertObjectManager alertObjectLoader) { _chatService = chatService; _streamlabsClient = streamlabsClient; _alertObjectLoader = alertObjectLoader; _synchronizationContext = SynchronizationContext.Current; _chatService.OnEvent += OnEvent; _streamlabsClient.OnEvent += OnEvent; Plugin.Log.Notice("Queue Controller Contructed"); }
private async void BeginExit() { _IsExiting = true; LoggingManager.Log.Info("Exiting, this will take a few seconds..."); await DiscordClient.StopAsync(); await StreamlabsClient.StopAsync(); LoggingManager.Flush(); await Task.Delay(3000); Environment.Exit(0); }
private async Task StartAsync() { LoggingManager.Log.Info("Starting..."); // Load content into cache await Cache.LoadContentAsync(); // Connect to Discord await DiscordClient.ConnectAsync(); // Connect to Streamlabs await StreamlabsClient.ConnectAsync(); // Block and wait await UserInputAsync(); }