From 7ef5848eb3a9271d552779f6ee012f7ed54dbcfc Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Thu, 20 Oct 2022 14:07:51 +0200 Subject: [PATCH] fix compilation error --- .../MareSynchronosServices/Discord/DiscordBot.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBot.cs b/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBot.cs index 056ed05..32909f5 100644 --- a/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBot.cs +++ b/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBot.cs @@ -76,13 +76,6 @@ internal class DiscordBot : IHostedService try { _logger.LogInformation($"Cleaning up Vanity UIDs"); - var guild = _discordClient.Guilds.FirstOrDefault(); - if (guild == null) - { - _logger.LogInformation($"Guild was null"); - throw new Exception("Guild is null"); - } - _logger.LogInformation("Getting application commands from guild {guildName}", guild.Name); var restGuild = await _discordClient.Rest.GetGuildAsync(guild.Id); var vanityCommand = await restGuild.GetSlashCommandAsync(vanityCommandId).ConfigureAwait(false);