From 167b4da229a86424f64f050be2503a3cac27f093 Mon Sep 17 00:00:00 2001 From: Zontreck Date: Tue, 10 Mar 2020 16:07:42 -0700 Subject: [PATCH] add reload cache --- Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 6990dc1..178d3f9 100644 --- a/Program.cs +++ b/Program.cs @@ -268,6 +268,11 @@ namespace Bot prompter.Start(); CM = new CommandManager(BotSession.Instance.Logger, client, MH.callbacks); + + GroupsCache = new Dictionary(); + ReloadGroupsCache(); + + while (g_iIsRunning) { string consoleCmd = "N/A"; @@ -814,7 +819,6 @@ namespace Bot } private static void ReloadGroupsCache() { - GroupsCache = new Dictionary(); client.Groups.CurrentGroups += Groups_CurrentGroups; client.Groups.RequestCurrentGroups(); GroupsEvent.WaitOne(10000, false);