Beispiel #1
0
 private void Client_OnConnectedError(object sender, OnConnectionErrorArgs e)
 {
     form.ExecuteAction(() =>
     {
         form.DebugRichTextBox.AppendText($"{e.Error.Message}\n");
     });
 }
Beispiel #2
0
 // Token: 0x06000014 RID: 20 RVA: 0x00002B98 File Offset: 0x00000D98
 private void onJoinError(object sender, OnConnectionErrorArgs e, int position)
 {
     try
     {
         this.Log(string.Concat(new object[]
         {
             e.BotUsername,
             " Error(",
             e.Error,
             ")"
         }));
         this.Common.Dispatcher.Invoke(delegate()
         {
             (this.Common.Items[position] as ListBoxItem).Foreground = Brushes.Red;
         });
         this.status[position] = "Failed";
     }
     catch (Exception ex)
     {
         try
         {
             this.Log(ex.Message);
         }
         catch
         {
         }
     }
 }
Beispiel #3
0
 private void Client_OnConnectedError(object sender, OnConnectionErrorArgs e)
 {
     MessageTimerController.Instance.Stop();
     TwitchBotGlobalObjects.TwitchBotConnectedState = TwitchBotConnectedState.Reconnect;
     MessageBox.Show($"Bot cant connect to chanel");
     Client.Connect();
 }
Beispiel #4
0
        private void OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            StatusArgs status = new StatusArgs();

            status.Status = StatusArgs.TwitchBotStatus.ConnectionError;
            StatusEvent(this, status);
        }
Beispiel #5
0
        private void Client_OnConnecitonError(object sender, OnConnectionErrorArgs e)
        {
            consoleMessage[3] = "Connection Error!";
            consoleMessage[5] = e.Error.Message;
            Program.SendToConsole(consoleMessage);

            //Program.SendToConsole($"Error!! {e.Error}");
        }
Beispiel #6
0
        private void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            Kill();

            Client.Initialize(new ConnectionCredentials(Username, Oauth), Channel);

            Client.Connect();
        }
Beispiel #7
0
        private void OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            var botName = e?.BotUsername ?? "<unknown>";

            _connectionFailures++;
            _isReady = false;
            WriteLine($"{botName} had a problem connecting to Twitch (failure #{_connectionFailures})!");
        }
Beispiel #8
0
 private void onError2(object sender, OnConnectionErrorArgs e)
 {
     Invoke((MethodInvoker) delegate
     {
         txtStatus.ForeColor = Color.FromArgb(152, 0, 0); //Grün
         txtStatus.Text      = "Fehler mit der Verbindung.. Verbindung wird neu hergestellt";
     });
 }
Beispiel #9
0
 private void ConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Invoke((MethodInvoker) delegate
     {
         txtStatus.ForeColor = Color.FromArgb(153, 0, 0); //Grün
         txtStatus.Text      = "Verbindung beendet";
     });
 }
Beispiel #10
0
 private void Client_ConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Console.WriteLine(e.Error);
     isConnected = false;
     window.Dispatcher.Invoke((Action)(() =>
     {//this refer to form in WPF application
         window.BotStartFailed();
     }));
 }
Beispiel #11
0
        private void OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
#if DEBUG
            MessageBox.Show("连接出现错误,请重新连接。\r\n\r\n" + e.Error, Text);
#else
            MessageBox.Show("连接出现错误,请重新连接。" + e.Error.StackTrace, Text);
#endif
            Close();
        }
        private void OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            if (TryReconnect == false)
            {
                Console.WriteLine($"Failed to connect: {e.Error.Message}");

                TryReconnect = true;
            }
        }
        private void Connect_Error(object sender, OnConnectionErrorArgs e)
        {
            LogText(MessageType.Error);

            client.Disconnect();

            var login = new SignIn();

            login.ShowDialog();
        }
Beispiel #14
0
        private void OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            EvtConnectionErrorArgs cErrArgs = new EvtConnectionErrorArgs()
            {
                Error       = new EvtErrorData(e.Error.Message),
                BotUsername = e.BotUsername
            };

            OnConnectionErrorEvent?.Invoke(cErrArgs);
        }
Beispiel #15
0
        /// <summary>
        /// Invokes the connection error.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="botUsername">The bot username.</param>
        /// <param name="errorEvent">The error event.</param>
        public static void InvokeConnectionError(this TwitchClient client, string botUsername, ErrorEvent errorEvent)
        {
            OnConnectionErrorArgs model = new OnConnectionErrorArgs()
            {
                BotUsername = botUsername,
                Error       = errorEvent
            };

            client.RaiseEvent("OnConnectionError", model);
        }
 private void Cl_OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     try
     {
         this.logger.LogError("An Exception Occurred Connecting!  Perhaps restarting could help? Error username: {e.BotUsername} | Error message: {e.Error}");
     }
     catch (Exception exc)
     {
         this.logger.LogError(ExceptionFormatter.FormatException(exc, $"Exception in {this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod().Name}"));
     }
 }
 private void onConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Console.WriteLine("Connection Error!!!");
     while (!client.IsConnected)
     {
         Thread.Sleep(5000);
         try
         {
             client.Connect();
             Console.WriteLine("Conected Again! " + DateTime.Now);
         }
         catch
         {
             Console.WriteLine("Connect fail: " + DateTime.Now);
         }
     }
 }
        private void Client_OnConnectionError(object sender, OnConnectionErrorArgs args)
        {
            if (Settings.ReconnectCanvas)
            {
                this.TrayIcon.Text = "Connection Error... Reconnecting";

                var delay = Settings.ReconnectDelay;
                if (delay < 0)
                {
                    delay *= -1;
                }

                var t = new STimer(delay * 1000);
                t.Elapsed += (s, e) =>
                {
                    this.TwitchSetup(Properties.Resources.TwitchClient, Settings.TwitchAccessToken, Settings.TwitchSubject, Settings.State, save: false);
                    t.Stop();
                };
                t.Start();
            }
        }
Beispiel #19
0
        private async void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
        {
            try
            {
                await RefreshToken();

                credentials = new ConnectionCredentials("Anulyev", accesstoken);
                client.Initialize(credentials, Startup.streamerName, '\0', '\0', true);
                client.Reconnect();
            }
            catch (Exception ex)
            {
                logService.Add($"{ex.Message} | {e.Error.Message}", MessageType.Type.ERROR,
                               MethodBase.GetCurrentMethod().DeclaringType);
                await RefreshToken();

                credentials = new ConnectionCredentials("Anulyev", accesstoken);
                client.Initialize(credentials, Startup.streamerName, '\0', '\0', true);
                client.Reconnect();
                logService.Add(ex, MessageType.Type.DEBUGINFO,
                               MethodBase.GetCurrentMethod().DeclaringType);
            }
        }
Beispiel #20
0
 private void Client_OnConnectionError(object?sender, OnConnectionErrorArgs e)
 {
 }
Beispiel #21
0
 private void OnBotConnectionError(object sender, OnConnectionErrorArgs e)
 {
     ConsoleHelper.WriteLine($"[ERROR] CONNECTION WITH TWITCH HAS BEEN LOST.", Color.Red);
 }
Beispiel #22
0
 /// <summary>
 ///  function for error on connection.
 /// </summary>
 private void OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Log.Error($"[chatbot connect error] {e.Error.Message}");
     Log.CloseProgram();
 }
 private void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Console.WriteLine(e.Error);
 }
Beispiel #24
0
 private static void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Console.WriteLine($"CONNECTION ERROR: {e.Error.Message}");
 }
Beispiel #25
0
 private static void OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     BNC_Core.Logger.Log($"Twitch Integration Connection Error {e.Error.Message}", LogLevel.Error);
 }
Beispiel #26
0
 private void clientOnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     msgError($"Error!! {e.Error}");
 }
Beispiel #27
0
 // this section manages connection errors when a connection is attempted.
 private void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     mainMenu.ChangeLogLabel("Connection Error. Check username and auth code.");
 }
 private void Client__OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     client_.Reconnect();
 }
Beispiel #29
0
 /// <summary>
 /// Fires when twitch client gets an errror I guess
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <returns></returns>
 private async void TwitchOnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     await Program.BotEvents.RaiseOnTwitchConnectionError(e.ToString());
 }
 private void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
 {
     Program.Logger.WriteLine($"Error: {e.Error}", Color.Red);
 }