- fix spotify playlist playback

- fix spotify playlist embed failing due to too long description
- fix not removing current playlist after adding another
- exchanged Description and Tracks field in playlist embed
This commit is contained in:
Tim Müller
2022-03-20 15:06:38 +01:00
parent 2b9986a7fa
commit c9c5a4f892
6 changed files with 48 additions and 25 deletions

View File

@@ -206,14 +206,14 @@ namespace TomatenMusic.Commands
}
}
try
try
{
if (response.isPlaylist)
{
LavalinkPlaylist playlist = response.Playlist;
await player.PlayPlaylistAsync(playlist);
_ = ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("Now Playing:").AddEmbed(
Common.AsEmbed(playlist)
));
@@ -231,7 +231,7 @@ namespace TomatenMusic.Commands
catch (Exception ex)
{
await ctx.EditResponseAsync(new DiscordWebhookBuilder()
.WithContent($"❌ An error occured while playing your Track: ``{ex.Message}``")
.WithContent($"❌ An error occured while playing your Track: ``{ex.Message}``, ```{ex.StackTrace}```")
);
return;
}