Skip to content

Commit

Permalink
Add anothen message to onTrackError handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MichailiK authored Oct 15, 2024
1 parent 58a9e76 commit 070938b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/jagrosh/jmusicbot/audio/AudioHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,15 @@ public void onTrackEnd(AudioPlayer player, AudioTrack track, AudioTrackEndReason
@Override
public void onTrackException(AudioPlayer player, AudioTrack track, FriendlyException exception)
{
if (exception.getMessage().equals("Sign in to confirm you're not a bot"))
if (
exception.getMessage().equals("Sign in to confirm you're not a bot")
|| exception.getMessage().equals("Please sign in")
)
LOGGER.error(
"Track {} has failed to play: Sign in to confirm you're not a bot."
"Track {} has failed to play: {}"
+ "You will need to sign in to Google to play YouTube tracks. More info: https://jmusicbot.com/youtube-oauth2",
track.getIdentifier()
track.getIdentifier(),
exception.getMessage()
);
else
LOGGER.error("Track {} has failed to play", track.getIdentifier(), exception);
Expand Down

0 comments on commit 070938b

Please sign in to comment.