update youtube-source to latest version

This commit is contained in:
anthorob committed 2025-02-27 04:35:01 -05:00
1 parent daac16ea47
commit 80104d3e9a
3 files changed
+11 -6

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@
<dependency> <dependency>
<groupId>dev.lavalink.youtube</groupId> <groupId>dev.lavalink.youtube</groupId>
<artifactId>v2</artifactId> <artifactId>v2</artifactId>
<version>1.11.4</version> <version>1.11.5</version>
</dependency> </dependency>
<dependency> <dependency>
@@ -123,16 +123,16 @@ public class EventsHandler implements EventListener {
if (context instanceof CommandContext commandContext) { if (context instanceof CommandContext commandContext) {
handleCommand(commandContext); handleCommand(commandContext);
return;
} }
if (context instanceof TaskContext taskContext) { if (context instanceof TaskContext taskContext) {
handleTask(taskContext); handleTask(taskContext);
return;
} }
break;
} }
eventClass = eventClass.getSuperclass(); // Move up the hierarchy eventClass = eventClass.getSuperclass();
} }
} }
@@ -62,6 +62,8 @@ public class TrackLoadingHandler implements AudioLoadResultHandler {
@Override @Override
public void noMatches() { public void noMatches() {
logger.debug("Guild {}: no matches for identifier {}", guild.getId(), identifier);
if (!silent) if (!silent)
context.reply("No matches found"); context.reply("No matches found");
} }
@@ -69,9 +71,12 @@ public class TrackLoadingHandler implements AudioLoadResultHandler {
@Override @Override
public void loadFailed(FriendlyException e) { public void loadFailed(FriendlyException e) {
logger.debug("Guild {}: load failed for identifier {}", guild.getId(), identifier, e); logger.debug("Guild {}: load failed for identifier {}", guild.getId(), identifier, e);
LogHandler.log(e);
//TODO: better error messages
RuntimeException exception = new RuntimeException("Failed to load track: " + e.getMessage(), e);
LogHandler.log(exception);
if (!silent) if (!silent)
context.reply(MessageFunction.buildSentryErrorMessage(new RuntimeException("Failed to load track: " + e.getMessage(), e))); context.reply(MessageFunction.buildSentryErrorMessage(exception));
} }
} }