Esempio n. 1
0
        public static async Task GIRUBotInitializationTasks()
        {
            try
            {
                ITextChannel chnl = null;

                while (chnl == null)
                {
                    chnl = _client.GetChannel(Global.Config.MeleeSlasherMainChannel) as ITextChannel;
                    if (chnl != null)
                    {
                        await chnl.SendMessageAsync("GIRUBotV3 starting...");


                        var exceptionHandlerReady = ExceptionHandler.InitContext(_client);
                        if (exceptionHandlerReady)
                        {
                            await chnl.SendMessageAsync("Reporting systems online");
                        }

                        await chnl.SendMessageAsync("Ready");
                    }

                    Task.Delay(1000).Wait();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Failed to initialize GIRUBot {ex.Message}");
                throw ex;
            }
        }