update youtube-source to latest version
This commit is contained in:
1 parent
daac16ea47
commit
80104d3e9a
3 files changed
+12
-7
No files matched your search
@@ -111,7 +111,7 @@
|
||||
<dependency>
|
||||
<groupId>dev.lavalink.youtube</groupId>
|
||||
<artifactId>v2</artifactId>
|
||||
<version>1.11.4</version>
|
||||
<version>1.11.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -123,16 +123,16 @@ public class EventsHandler implements EventListener {
|
||||
|
||||
if (context instanceof CommandContext commandContext) {
|
||||
handleCommand(commandContext);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context instanceof TaskContext taskContext) {
|
||||
handleTask(taskContext);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eventClass = eventClass.getSuperclass(); // Move up the hierarchy
|
||||
break;
|
||||
}
|
||||
|
||||
eventClass = eventClass.getSuperclass();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ public class TrackLoadingHandler implements AudioLoadResultHandler {
|
||||
|
||||
@Override
|
||||
public void noMatches() {
|
||||
logger.debug("Guild {}: no matches for identifier {}", guild.getId(), identifier);
|
||||
|
||||
if (!silent)
|
||||
context.reply("No matches found");
|
||||
}
|
||||
@@ -69,9 +71,12 @@ public class TrackLoadingHandler implements AudioLoadResultHandler {
|
||||
@Override
|
||||
public void loadFailed(FriendlyException 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)
|
||||
context.reply(MessageFunction.buildSentryErrorMessage(new RuntimeException("Failed to load track: " + e.getMessage(), e)));
|
||||
context.reply(MessageFunction.buildSentryErrorMessage(exception));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user