Exemple #1
0
        private static void Main(string[] args)
        {
            Console.Title = $"XenoBot2 v{Utilities.GetVersion()}";
            BotInstance   = new BotCore();
            try
            {
                BotInstance.Initialize().Wait();
                BotInstance.Connect();
            }
            catch (AggregateException ex)
            {
                if (!(ex.GetBaseException() is FileNotFoundException))
                {
                    throw ex.GetBaseException();
                }

                NonBlockingConsole.WriteLine();
                NonBlockingConsole.WriteLine("Press enter to exit.");
                Console.ReadLine();
            }
        }
Exemple #2
0
        /// <summary>
        ///     Writes an entry to the log with a date stamp.
        /// </summary>
        /// <param name="data">The message to write to the log.</param>
        internal static void WriteLog(string data)
        {
            var message = $"[{DateTime.Now}] {data}";

            NonBlockingConsole.WriteLine(message);
        }