public async Task ChannelDestroyed(SocketChannel channel) { try { ServerList server = ServerListsManager.GetServer(((SocketGuildChannel)channel).Guild); //Check the server's welcome settings await BotCheckServerSettings.CheckServerWelcomeSettings(server); //Check the bot's auto voice channels BotCheckServerSettings.CheckServerVoiceChannels(server); BotCheckServerSettings.CheckServerActiveVoiceChannels(server); //Check the bot's rule message channel await BotCheckServerSettings.CheckServerRuleMessageChannel(server); } catch (Exception ex) { #if DEBUG Logger.Log(ex.ToString(), LogVerbosity.Error); #else Logger.Log(ex.Message, LogVerbosity.Error); #endif } }
public async Task ChannelDestroyed(SocketChannel channel) { try { ServerList server = ServerListsManager.GetServer(((SocketGuildChannel)channel).Guild); //Check the server's welcome settings await BotCheckServerSettings.CheckServerWelcomeSettings(server); //Check the bot's auto voice channels BotCheckServerSettings.CheckServerVoiceChannels(server); BotCheckServerSettings.CheckServerActiveVoiceChannels(server); //Check the bot's rule message channel await BotCheckServerSettings.CheckServerRuleMessageChannel(server); } catch (Exception ex) { Logger.Error("An error occured while managing channel destroyed event! {@Exception}", ex); } }