Added better handling of private playlists.
This commit is contained in:
@@ -183,10 +183,15 @@ public final class TrackLoadHandler implements AudioLoadResultHandler {
|
||||
Checks.notNull(exception, "Exception");
|
||||
|
||||
final CommandResponse response;
|
||||
if (exception.getMessage().equals("Unknown file format.")) {
|
||||
final String message = exception.getMessage();
|
||||
if (message.equals("Unknown file format.")) {
|
||||
response = new CommandResponse("question",
|
||||
"Sorry " + this.requester.getAsMention() + ", but I do not recognize the format of that track.")
|
||||
.setDeletionDelay(10, TimeUnit.SECONDS);
|
||||
} else if (message.equals("The playlist is private.")) {
|
||||
response = new CommandResponse("no_entry_sign",
|
||||
"Sorry " + this.requester.getAsMention() + ", but that playlist is private.").setDeletionDelay(10,
|
||||
TimeUnit.SECONDS);
|
||||
} else {
|
||||
final Guild guild = this.channel.getGuild();
|
||||
logger.error("An error occurred for " + guild.getName() + " (" + guild.getId()
|
||||
|
||||
Reference in New Issue
Block a user