コード例 #1
0
        public static async void StartBot(Core.OctoBot bot, bool useCatch = false)
        {
            ILoggingService loggingService = Application.Resolve <ILoggingService>();

            try
            {
                // Запуск
                await bot.Initialize();

                await bot.Start();

                Debug.WriteLine(1);
            }
            catch (Exception exc)
            {
                loggingService.Fatal($"OctoBot Exception : {exc.Message}");

                if (useCatch == false)
                {
                    throw new Exception(exc.Message);
                }

                Commands.StopBot(bot);
            }
        }
コード例 #2
0
 public static void StopBot(Core.OctoBot bot)
 {
     Debug.WriteLine(1);
 }