From f4e4ba3687492bc92929b70d5a87e6102db6cb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Konieczny?= Date: Sat, 9 Mar 2024 21:37:31 +0100 Subject: [PATCH] - Updated LavaPlayer and removed track artwork from embeds (sadly, it isn't supported in Lavalink's fork of LavaPlayer) --- pom.xml | 11 ++++++++--- .../eukon05/dilanbot/music/MusicCommandHandler.java | 11 +++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 8a5eb81..ac0bba2 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 17 - custom-SNAPSHOT + 6d14c5b2d96fd953c671cfae8f9b9ea11aa20d5a-SNAPSHOT 3.8.0 2.10.1 5.1.0 @@ -21,6 +21,11 @@ + + arbjergDev + Lavalink Repository + https://maven.lavalink.dev/snapshots + jitpack https://jitpack.io @@ -42,8 +47,8 @@ - com.github.walkyst - lavaplayer-fork + dev.arbjerg + lavaplayer ${lavaplayer.version} diff --git a/src/main/java/com/eukon05/dilanbot/music/MusicCommandHandler.java b/src/main/java/com/eukon05/dilanbot/music/MusicCommandHandler.java index d9d9b4e..476a388 100644 --- a/src/main/java/com/eukon05/dilanbot/music/MusicCommandHandler.java +++ b/src/main/java/com/eukon05/dilanbot/music/MusicCommandHandler.java @@ -56,8 +56,6 @@ public void handlePlay(SlashCommandCreateEvent event) { result.playlistName().ifPresentOrElse(embed::setDescription, () -> embed.setDescription(String.format(MARKDOWN_URL, firstTrackInfo.title, firstTrackInfo.uri))); - embed.setThumbnail(firstTrackInfo.artworkUrl); - responder.addEmbed(embed).send(); } catch (DilanException e) { e.handle(responder, locale); @@ -90,8 +88,7 @@ public void handleSkip(SlashCommandCreateEvent event) { result.ifPresent(track -> { EmbedBuilder embed = new EmbedBuilder() .setTitle(Message.NOW_PLAYING.get(locale)) - .setDescription(String.format(MARKDOWN_URL, track.getInfo().title, track.getInfo().uri)) - .setThumbnail(track.getInfo().artworkUrl); + .setDescription(String.format(MARKDOWN_URL, track.getInfo().title, track.getInfo().uri)); responder.addEmbed(embed); }); @@ -189,8 +186,7 @@ public void handleNowPlaying(SlashCommandCreateEvent event) { EmbedBuilder embed = new EmbedBuilder() .setTitle(Message.NOW_PLAYING.get(locale)) - .setDescription(String.format(MARKDOWN_URL, track.getInfo().title, track.getInfo().uri)) - .setThumbnail(track.getInfo().artworkUrl); + .setDescription(String.format(MARKDOWN_URL, track.getInfo().title, track.getInfo().uri)); responder.addEmbed(embed).send(); } catch (DilanException e) { @@ -216,8 +212,7 @@ public void handleLoop(SlashCommandCreateEvent event) { EmbedBuilder embed = new EmbedBuilder() .setTitle(Message.LOOP_ENABLED.get(locale)) - .setDescription(String.format(MARKDOWN_URL, info.title, info.uri)) - .setThumbnail(info.artworkUrl); + .setDescription(String.format(MARKDOWN_URL, info.title, info.uri)); responder.addEmbed(embed); }, () -> responder.setContent(Message.LOOP_DISABLED.get(locale)));