From e54f1b8575c5480dc5bd7f906ee78d694cb293c1 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 20 Jul 2016 16:40:05 +0200 Subject: [PATCH] reduced global nadeko startup wait, added a callback on when the IsReady flag is set to true --- NadekoBot/NadekoBot.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NadekoBot/NadekoBot.cs b/NadekoBot/NadekoBot.cs index ad1b0031..4a091e3e 100644 --- a/NadekoBot/NadekoBot.cs +++ b/NadekoBot/NadekoBot.cs @@ -41,6 +41,7 @@ namespace NadekoBot public static LocalizedStrings Locale { get; set; } = new LocalizedStrings(); public static string BotMention { get; set; } = ""; public static bool Ready { get; set; } = false; + public static Action OnReady { get; set; } = delegate { }; private static List OwnerPrivateChannels { get; set; } @@ -196,7 +197,7 @@ namespace NadekoBot return; } #if NADEKO_RELEASE - await Task.Delay(150000).ConfigureAwait(false); + await Task.Delay(90000).ConfigureAwait(false); #else await Task.Delay(1000).ConfigureAwait(false); #endif @@ -229,6 +230,7 @@ namespace NadekoBot }; PermissionsHandler.Initialize(); NadekoBot.Ready = true; + NadekoBot.OnReady(); }); Console.WriteLine("Exiting..."); Console.ReadKey(); @@ -277,5 +279,3 @@ namespace NadekoBot } } } - -//95520984584429568 meany