From edbac8390dda3474d1233ea92d68e30918dcb73a Mon Sep 17 00:00:00 2001 From: Sella-GH <147769367+Sella-GH@users.noreply.github.com> Date: Thu, 25 Jul 2024 00:54:58 +0200 Subject: [PATCH] Fix not needed variables --- src/AzzyBot-Next.Bot/Commands/MusicStreamingCommands.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/AzzyBot-Next.Bot/Commands/MusicStreamingCommands.cs b/src/AzzyBot-Next.Bot/Commands/MusicStreamingCommands.cs index d3463f42..0520b046 100644 --- a/src/AzzyBot-Next.Bot/Commands/MusicStreamingCommands.cs +++ b/src/AzzyBot-Next.Bot/Commands/MusicStreamingCommands.cs @@ -85,10 +85,9 @@ public async Task PlayAsync _logger.CommandRequested(nameof(PlayAsync), context.User.GlobalName); AzuraCastEntity azura = await _dbActions.GetAzuraCastAsync(context.Guild.Id, false, false, true) ?? throw new InvalidOperationException("AzuraCast is not set up for this server."); - AzuraCastStationEntity stationEntity = azura.Stations.FirstOrDefault(x => x.StationId == station) ?? throw new InvalidOperationException("Station not found."); try { - AzuraNowPlayingDataRecord nowPlaying = await _azuraCast.GetNowPlayingAsync(new(Crypto.Decrypt(azura.BaseUrl)), station); + await _azuraCast.GetNowPlayingAsync(new(Crypto.Decrypt(azura.BaseUrl)), station); } catch (HttpRequestException) {