private void OnBotError(object sender, ChatBot.ErrorEventArgs e) { m_bot?.Dispose(); m_toggle.IsChecked = false; ErrorManager.AddError(new Error(Name, e.ErrorMessage), true); }
private void DisconnectFromTwitch() { if (m_bot?.Connected ?? false) { m_bot.ConnectedToChannel -= OnBotConnected; m_bot.NewMessage -= OnBotMessage; m_bot.Error -= OnBotError; m_bot.Dispose(); m_bot = null; } }