Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
- Updated LavaPlayer and removed track artwork from embeds (sadly, it…
Browse files Browse the repository at this point in the history
… isn't supported in Lavalink's fork of LavaPlayer)
  • Loading branch information
Eukon05 committed Mar 9, 2024
1 parent c8aac40 commit f4e4ba3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<properties>

<java.version>17</java.version>
<lavaplayer.version>custom-SNAPSHOT</lavaplayer.version>
<lavaplayer.version>6d14c5b2d96fd953c671cfae8f9b9ea11aa20d5a-SNAPSHOT</lavaplayer.version>
<javacord.version>3.8.0</javacord.version>
<gson.version>2.10.1</gson.version>
<kcommando.version>5.1.0</kcommando.version>
Expand All @@ -21,6 +21,11 @@
</properties>

<repositories>
<repository>
<id>arbjergDev</id>
<name>Lavalink Repository</name>
<url>https://maven.lavalink.dev/snapshots</url>
</repository>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
Expand All @@ -42,8 +47,8 @@
</dependency>

<dependency>
<groupId>com.github.walkyst</groupId>
<artifactId>lavaplayer-fork</artifactId>
<groupId>dev.arbjerg</groupId>
<artifactId>lavaplayer</artifactId>
<version>${lavaplayer.version}</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});
Expand Down Expand Up @@ -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) {
Expand All @@ -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)));
Expand Down

0 comments on commit f4e4ba3

Please sign in to comment.