From f15ded098140db1122d89aad217ed63964de2b49 Mon Sep 17 00:00:00 2001 From: TheUbMunster Date: Tue, 11 Jul 2023 04:58:27 -0600 Subject: [PATCH] lgtm? --- Server/DiscordBot.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Server/DiscordBot.cs b/Server/DiscordBot.cs index bc68206..4109249 100644 --- a/Server/DiscordBot.cs +++ b/Server/DiscordBot.cs @@ -136,7 +136,10 @@ public class DiscordBot try { if (client != null) - client.StopAsync().Wait(); + { + if (!client.StopAsync().Wait(60000)) + logger.Warn("Tried to stop the discord bot, but attempt took >60 seconds, so it failed!"); + } client?.Dispose(); } catch { /*lol (lmao)*/ } @@ -237,7 +240,7 @@ public class DiscordBot if (localSettings.CommandChannel == null) logger.Warn("You probably should set your CommandChannel in settings.json"); if (localSettings.AdminChannel == null) - logger.Warn("You probably should set your LogChannel in settings.json"); + logger.Warn("You probably should set your AdminChannel in settings.json"); if (oldSettings.Token != localSettings.Token || oldSettings.AdminChannel != localSettings.AdminChannel || oldSettings.CommandChannel != localSettings.CommandChannel) {