public void Dispose() { Log.Info("TS3AudioBot shutting down."); injector.GetModule <BotManager>()?.Dispose(); injector.GetModule <PluginManager>()?.Dispose(); injector.GetModule <WebServer>()?.Dispose(); injector.GetModule <DbStore>()?.Dispose(); injector.GetModule <ResourceResolver>()?.Dispose(); TickPool.Close(); }
private async Task StopAsync() { Log.Info("TS3AudioBot shutting down."); var botManager = injector.GetModule <BotManager>(); if (botManager != null) { await botManager.StopBots(); } injector.GetModule <PluginManager>()?.Dispose(); injector.GetModule <WebServer>()?.Dispose(); injector.GetModule <DbStore>()?.Dispose(); injector.GetModule <ResourceResolver>()?.Dispose(); injector.GetModule <DedicatedTaskScheduler>()?.Dispose(); Log.Info("Bye"); }