Skip to content

Commit

Permalink
Defer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sella-GH committed Jun 6, 2024
1 parent 6e4eb43 commit edd752b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AzzyBot-Next/Commands/AzuraCastCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public async ValueTask GetNowPlayingAsync

_logger.CommandRequested(nameof(GetNowPlayingAsync), context.User.GlobalName);

await context.DeferResponseAsync();

GuildsEntity guild = await _dbActions.GetGuildAsync(context.Guild.Id);
AzuraCastEntity azuraCast = guild.AzuraCast ?? throw new InvalidOperationException("AzuraCast is null");
AzuraCastStationEntity station = azuraCast.Stations.FirstOrDefault(s => s.StationId == stationId) ?? throw new InvalidOperationException("Station is null");
Expand All @@ -58,7 +60,7 @@ public async ValueTask GetNowPlayingAsync

DiscordEmbed embed = EmbedBuilder.BuildMusicNowPlayingEmbed(nowPlaying, playlistName);

await context.RespondAsync(embed);
await context.EditResponseAsync(embed);
}
}
}

0 comments on commit edd752b

Please sign in to comment.