private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     log.Add(new MessageEntry()
     {
         Message = "ClientDisconnected", Time = DateTime.Now
     });
 }
Beispiel #2
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     form.AppendLogLine($"!!! Disconnected");
     form.LockControls(false);
     form.connectState = false;
     form.CreateBot();
 }
Beispiel #3
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     if (!closing)
     {
         Restart();
     }
 }
Beispiel #4
0
        private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
        {
            try
            {
                logService.Add($"Reconnecting......", MessageType.Type.EVENT,
                               MethodBase.GetCurrentMethod().DeclaringType);
                client.Reconnect();
                if (client.IsConnected == false)
                {
                    credentials = new ConnectionCredentials("Anulyev", accesstoken);
                    client.Initialize(credentials, Startup.streamerName, '\0', '\0', true);
                    client.Connect();
                    if (client.JoinedChannels.Count == 0)
                    {
                        Debug.WriteLine($"Is Connected : {client.IsConnected}. No connected channels . Lets try to connect");
                        client.JoinChannel(Startup.streamerName);
                    }

                    logService.Add($"Bot connection : {client.IsConnected}. Connected to {client.JoinedChannels[0]?.Channel}", MessageType.Type.DEBUGINFO,
                                   MethodBase.GetCurrentMethod().DeclaringType);
                }
            }
            catch (Exception ex)
            {
                logService.Add($"{ex.Message}", MessageType.Type.EVENT,
                               MethodBase.GetCurrentMethod().DeclaringType);
            }
        }
Beispiel #5
0
        private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
        {
            Utilities.Log($"ClientDisconnected");
            QTChatManager.Instance.ToggleChat(false);

            this.timersManager?.StopTimers();

            this.OnDisconnected?.Invoke(sender, null);
        }
Beispiel #6
0
        private static void _client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
        {
            // Disconnected
            Application.Current.Dispatcher.Invoke(new Action(() =>
            {
                foreach (Window window in Application.Current.Windows)
                {
                    if (window.GetType() != typeof(MainWindow))
                    {
                        continue;
                    }

                    //(window as MainWindow).icon_Twitch.Foreground = new SolidColorBrush(Colors.Red);
                    (window as MainWindow).LblStatus.Content             = "Disconnected from Twitch";
                    (window as MainWindow).mi_TwitchConnect.IsEnabled    = true;
                    (window as MainWindow).mi_TwitchDisconnect.IsEnabled = false;
                }
            }));

            Logger.LogStr("Disconnected from Twitch");
        }
Beispiel #7
0
 private static void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     BotTools.LogLine("RazBot lost connection to Twitch, reconnecting...");
     Client = NewTwitchConnection();
     Client.JoinChannel(CurrentChannel.ToLower());
 }
Beispiel #8
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     new Startup().Show();
     window.Close();
 }
Beispiel #9
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.Green;
     Console.WriteLine("Successfully disconnected!");
     Console.ResetColor();
 }
Beispiel #10
0
 private void TwitchClient_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     _logger.LogInformation("Twitch Client disconnected");
 }
Beispiel #11
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     Console.WriteLine($"Disconnected from {_channel}");
 }
Beispiel #12
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     //client.Reconnect();
 }
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     Console.WriteLine("******** BOT DISCONNECTED!!! **********");
 }
Beispiel #14
0
 private static void _client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     UpdateMainWindowStatus("Disconnected from Twitch");
 }
Beispiel #15
0
 /// <summary>
 /// Event handler for the TwitchClient OnDisconnected event.
 /// </summary>
 private void TwitchClient_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     SendChatMessage("Disconnected from Twitch.");
 }
Beispiel #16
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     Logger.Instance.LogMessage(TracingLevel.INFO, $"Disconnected from chat room");
 }
Beispiel #17
0
 private void Client_OnDisconnected(object sender, TwitchLib.Communication.Events.OnDisconnectedEventArgs e)
 {
     //client.SendMessage(Channel, "Oh no mi sono disconnesso");
 }