spotify is v silly!

This commit is contained in:
Lee 2024-06-28 04:04:50 +01:00
parent bf554933cc
commit d77c937818
3 changed files with 15 additions and 16 deletions

@ -42,13 +42,13 @@ public class CurrentSubCommand extends BatSubCommand {
return; return;
} }
// if (!spotifyService.hasTrackPlaying(user)) { if (!spotifyService.hasTrackPlaying(user)) {
// interaction.replyEmbeds(EmbedUtils.genericEmbed() interaction.replyEmbeds(EmbedUtils.genericEmbed()
// .setDescription("You are not currently playing a track.") .setDescription("You are not currently playing a track.")
// .build()) .build())
// .queue(); .queue();
// return; return;
// } }
CurrentlyPlaying currentlyPlaying = spotifyService.getCurrentlyPlayingTrack(user); CurrentlyPlaying currentlyPlaying = spotifyService.getCurrentlyPlayingTrack(user);
Track track = (Track) currentlyPlaying.getItem(); Track track = (Track) currentlyPlaying.getItem();
AlbumSimplified album = track.getAlbum(); AlbumSimplified album = track.getAlbum();

@ -36,13 +36,13 @@ public class PauseSubCommand extends BatSubCommand {
return; return;
} }
// if (!spotifyService.hasTrackPlaying(user)) { if (!spotifyService.hasTrackPlaying(user)) {
// interaction.replyEmbeds(EmbedUtils.genericEmbed() interaction.replyEmbeds(EmbedUtils.genericEmbed()
// .setDescription("You need to be playing a track to pause it.") .setDescription("You need to be playing a track to pause it.")
// .build()) .build())
// .queue(); .queue();
// return; return;
// } }
boolean didPause = spotifyService.pausePlayback(user); boolean didPause = spotifyService.pausePlayback(user);
interaction.replyEmbeds(EmbedUtils.genericEmbed() interaction.replyEmbeds(EmbedUtils.genericEmbed()

@ -86,8 +86,7 @@ public class SpotifyService {
try { try {
return getSpotifyApi(user).getUsersCurrentlyPlayingTrack().build().execute(); return getSpotifyApi(user).getUsersCurrentlyPlayingTrack().build().execute();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); throw new RuntimeException("Failed to get currently playing track", e);
return null;
} }
} }