/// <summary> /// Helps us shutdown. /// </summary> /// <param name="message"></param> /// <param name="e"></param> /// <returns></returns> private async Task Shutdown(string message, GameError e) { Logger.Log(Log.Error, $"That's not good..."); Logger.Log(Log.Error, $" ...we failed to {message}"); Logger.Log(Log.Error, $" ...because {(e != null ? e.Message : "")}"); Logger.Log(Log.Error, $" ...time to give up and shutdown!"); // Send the forfeit command to the game host since we don't know what to do. await m_bot.SendAction(GameAction <object> .CreateForfeitAction()); // Disconnect the bot. await m_bot.Disconnect(); }